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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. zip Command Examples in Linux
  2. How To Configure NIS (Network Information System) Master and Slave Servers in CentOS/RHEL
  3. CentOS / RHEL 5 : How to Boot into Rescue Mode
  4. nslookup Command Examples in Linux
  5. How to add Source, Services and Ports to Firewall Zone in CentOS/RHEL 7 and 8
  6. numlockx: command not found
  7. How To Configure sssd To Work With Multiple Active Directory Domains in Different Forests (CentOS/RHEL)
  8. equery Command Examples in Gentoo Linux
  9. Unable to ssh to server after integration into Active Directory (AD) Domain [CentOS/RHEL 7]
  10. How to Reserve a Port Range for a Third Party Application in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright