Pi-hole is a network-wide ad-blocking solution that functions by acting as a DNS sinkhole. It blocks advertisements and other unwanted content by intercepting domain name resolution requests and returning a blank response to any requests for known ad-serving domains. Pi-hole is an open-source project that can be installed on a Raspberry Pi or any other Linux-based device, and it can be configured to function as the DNS server for an entire network.
The Pi-hole software can be installed via the command line on a Linux device. Once installed, it provides a web interface for configuration and management. However, in addition to the web interface, there is also a command-line interface for managing the Pi-hole server.
The terminal interface for Pi-hole provides a way for users to manage the Pi-hole server using command-line commands, which can be useful for advanced users who prefer the command-line interface to the web interface. With the terminal interface, users can view the status of the Pi-hole server, enable or disable specific blocking features, update blocklists, and more.
Overall, the terminal interface for Pi-hole provides a flexible and powerful way to manage the Pi-hole ad-blocking DNS server, and it is a valuable tool for those who prefer to work with command-line interfaces.
pihole Command Examples
1. Check the Pi-hole daemon’s status:
# pihole status
2. Update Pi-hole and Gravity:
# pihole -up
3. Monitor detailed system status:
# pihole chronometer
4. Start or stop the daemon:
# pihole {{enable|disable}}
5. Restart the daemon (not the server itself):
# pihole restartdns
6. Whitelist or blacklist a domain:
# pihole {{whitelist|blacklist}} {{example.com}}
7. Search the lists for a domain:
# pihole query {{example.com}}
8. Open a real-time log of connections:
# pihole tail