Command line interface tools
Advanced Features
Pi-hole Command-Line Tools Guide
The Pi-hole system provides several command-line interface (CLI) tools for managing its functionality. Here are the essential commands:
Primary Command: pihole
This is the main command for Pi-hole management, with these important subcommands:
pihole status- Shows Pi-hole's current operational statuspihole enable- Activates Pi-hole's blocking functionalitypihole disable [time]- Deactivates blocking (temporarily or permanently)pihole restartdns- Restarts the DNS resolver after configuration changespihole -t- Displays DNS queries in real-timepihole updateGravity- Downloads and updates the latest blocklistpihole -g- Alternative command for updating the blocklistpihole -up- Updates Pi-hole software to the newest versionpihole -a [options]- Manages administrative settings, including password changes
Additional Useful Commands:
tail -f /var/log/pihole.log- Shows live Pi-hole log entries for troubleshooting- DNS utility commands:
dignslookuphostThese standard DNS tools help query and verify DNS records when using Pi-hole
All these commands enable comprehensive management of your Pi-hole installation directly from the command line.
Something here not working for you? Ask in the community — other makers and the Little Bird team read it.