• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pihole Command Examples in Linux

by Deepika

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

Filed Under: Linux

Some more articles you might also be interested in …

  1. legit: command not found
  2. checkinstall Command Examples in Linux
  3. make: command not found
  4. qsub Command Examples in Linux
  5. treetime Command Examples in Linux
  6. eject Command Examples in Linux
  7. top Command Examples in Linux
  8. lsscsi Command Examples in Linux
  9. chmod: command not found
  10. chrt : command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright