DEV Community

Cover image for Pi-hole v6 Command Reference: What Changed and How to Use It
Fedya Serafiev
Fedya Serafiev

Posted on • Originally published at itpraktika.com

Pi-hole v6 Command Reference: What Changed and How to Use It

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
Enter fullscreen mode Exit fullscreen mode

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\..*"
Enter fullscreen mode Exit fullscreen mode

Maintenance & Updates

# Update Pi-hole to latest version
pihole updatepihole

# Update Gravity (adlists)
pihole gravity

# Repair or reinstall
pihole -r
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Copy-Paste Solutions

Unblock entire Facebook:

pihole allow facebook.com www.facebook.com m.facebook.com static.facebook.com
Enter fullscreen mode Exit fullscreen mode

Check if domain is blocked:

pihole query ads.google.com
Enter fullscreen mode Exit fullscreen mode

Temporarily disable for 10 minutes (for testing):

pihole disable 10m
Enter fullscreen mode Exit fullscreen mode

Update everything:

pihole updatepihole && pihole gravity
Enter fullscreen mode Exit fullscreen mode

Live monitoring of what's being blocked:

pihole -t
Enter fullscreen mode Exit fullscreen mode

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)