Pi-hole v6 brought significant changes to its command-line interface, replacing cryptic flags with intuitive, English-language commands. If you're still typing pihole -w and pihole -b, it's time to upgrade your workflow.
What you'll learn:
- Migration guide: v5 → v6 command syntax
- Complete command reference by category
- Copy-paste solutions for common tasks
- Real-time monitoring and diagnostics
- Wildcard blocking with regex
Key changes at a glance:
| Old (v5) | New (v6) | Why it changed |
|---|---|---|
pihole -w <domain> |
pihole allow <domain> |
Clear meaning instead of -w
|
pihole -b <domain> |
pihole deny <domain> |
Clear meaning instead of -b
|
pihole -a -p |
pihole password |
Direct command, not hidden in admin |
pihole -q <domain> |
pihole query <domain> |
More descriptive name |
Quick examples:
# Allow a domain (whitelist)
pihole allow example.com
# Block a domain (blacklist)
pihole deny tracker.com
# Wildcard blocking
pihole deny --regex ".*ads\..*"
# Check if domain is blocked
pihole query doubleclick.net
# Disable blocking for 10 minutes
pihole disable 10m
# Real-time monitoring
pihole -t
Allow/Deny Management
# Add single domain to whitelist
pihole allow example.com
# Add multiple domains at once
pihole allow facebook.com www.facebook.com m.facebook.com
# Remove from whitelist
pihole allow -d example.com
# Block with wildcard (entire domain and subdomains)
pihole deny --regex ".*tracker\..*"
Maintenance & Updates
# Update Pi-hole to latest version
pihole updatepihole
# Update Gravity (adlists)
pihole gravity
# Repair or reinstall
pihole -r
Monitoring & Diagnostics
# Chronometer - real-time stats dashboard
pihole -c
# Tail Log - live query monitoring
# Green = allowed, Red = blocked
pihole -t
# Check which list contains a domain
pihole query doubleclick.net
# Check DNS status
pihole status
# View component versions
pihole version
System Control
# Disable permanently
pihole disable
# Disable for specific time
pihole disable 5m # 5 minutes
pihole disable 30s # 30 seconds
pihole disable 2h # 2 hours
# Re-enable
pihole enable
# Restart DNS service
pihole restartdns
# Change web interface password
pihole password
Copy-Paste Solutions
Unblock entire Facebook:
pihole allow facebook.com www.facebook.com m.facebook.com static.facebook.com
Check if domain is blocked:
pihole query ads.google.com
Temporarily disable for 10 minutes (for testing):
pihole disable 10m
Update everything:
pihole updatepihole && pihole gravity
Live monitoring of what's being blocked:
pihole -t
Important Notes
⚠️ Backward compatibility: Old v5 commands (pihole -w, pihole -b, etc.) still work, but it's recommended to migrate to the new syntax.
💡 Groups and comments: New commands support adding comments to domains and managing groups. Use the -h flag for details.
🔍 Gravity contains millions of domains: The pihole query command searches all of them in seconds.
Why this matters
The new syntax is easier to remember, more intuitive for newcomers, and aligns with modern CLI design principles. Your terminal history becomes more readable, and onboarding new team members is simpler.
📖 Read the full reference guide in Bulgarian: Наръчник за терминални команди в Pi-hole v6
If you found this helpful, check out more hands-on IT guides at itpraktika.com 🚀
Top comments (0)