Linux command
pihole 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
pihole status
Update
sudo pihole -up
Enable
pihole enable
Example
pihole disable
Update
pihole -g
Allow
pihole allow example.com
Example
pihole deny example.com
Query
pihole -q example.com
Example
pihole -t
Reload
pihole reloaddns
说明
pihole is the command-line interface for managing Pi-hole, a network-level ad and tracker blocking application that acts as a DNS sinkhole.
参数
- status
- Show current Pi-hole status
- enable
- Enable Pi-hole blocking
- disable TIME
- Disable Pi-hole blocking (optionally for specified time)
- -up, updatePihole
- Update Pi-hole to the latest version
- -g, updateGravity
- Update the gravity database (block lists)
- allow DOMAIN
- Add domain to the allow list
- deny DOMAIN
- Add domain to the deny list
- -q, query DOMAIN
- Search lists for a domain
- -t, tail
- View real-time log of DNS queries
- reloaddns
- Reload DNS lists and flush cache without restart
- restartdns
- Restart the DNS server
- -c, chronometer
- Display real-time stats in console
- -a, admin
- Admin console options (password reset, etc.)
- checkout
- Switch Pi-hole branches (for development)
FAQ
What is the pihole command used for?
pihole is the command-line interface for managing Pi-hole, a network-level ad and tracker blocking application that acts as a DNS sinkhole.
How do I run a basic pihole example?
Run `pihole status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does status do in pihole?
Show current Pi-hole status