Linux command
avahi-daemon 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start
avahi-daemon
Start
avahi-daemon --daemonize
Check
avahi-daemon --check
Reload
avahi-daemon --reload
Kill
avahi-daemon --kill
Enable debug
avahi-daemon --debug
说明
avahi-daemon implements Apple's Zeroconf architecture (also known as Rendezvous or Bonjour) on Linux and other Unix-like systems. It registers local IP addresses and static services using mDNS (Multicast DNS) and DNS-SD (DNS Service Discovery) protocols. The daemon provides service discovery functionality, allowing applications and devices on a local network to automatically discover each other without requiring manual configuration or a central DNS server. It publishes services and responds to service discovery queries from other hosts. At startup, avahi-daemon reads its configuration from /etc/avahi/avahi-daemon.conf and loads XML service definitions from **/etc/avahi/services/\*.service. When enabled, it also processes /etc/resolv.conf for unicast DNS server information. The daemon provides two IPC APIs: a simple protocol used by avahi-dnsconfd and nss-mdns, plus a comprehensive D-Bus interface for application integration. Signal handling: SIGINT and SIGTERM trigger shutdown, SIGHUP reloads DNS server data and service definitions, and SIGUSR1** dumps cached resource records to syslog for debugging.
参数
- -f, --file=_FILE_
- Specify configuration file (default: /etc/avahi/avahi-daemon.conf)
- -D, --daemonize
- Daemonize after startup; implies --syslog
- -s, --syslog
- Log to syslog instead of STDERR
- --debug
- Increase verbosity to debug level
- --no-rlimits
- Don't enforce resource limits from configuration file
- --no-drop-root
- Don't drop root privileges (not recommended for security)
- --no-chroot
- Disable chroot operation (requires compile-time support)
- --no-proc-title
- Don't change process name during execution
- -k, --kill
- Terminate running daemon by sending SIGTERM
- -r, --reload
- Reread resolv.conf and service definitions by sending SIGHUP
- -c, --check
- Return 0 if daemon is running, non-zero otherwise
- -h, --help
- Display help information
- -v, --version
- Show version information
FAQ
What is the avahi-daemon command used for?
avahi-daemon implements Apple's Zeroconf architecture (also known as Rendezvous or Bonjour) on Linux and other Unix-like systems. It registers local IP addresses and static services using mDNS (Multicast DNS) and DNS-SD (DNS Service Discovery) protocols. The daemon provides service discovery functionality, allowing applications and devices on a local network to automatically discover each other without requiring manual configuration or a central DNS server. It publishes services and responds to service discovery queries from other hosts. At startup, avahi-daemon reads its configuration from /etc/avahi/avahi-daemon.conf and loads XML service definitions from **/etc/avahi/services/\*.service. When enabled, it also processes /etc/resolv.conf for unicast DNS server information. The daemon provides two IPC APIs: a simple protocol used by avahi-dnsconfd and nss-mdns, plus a comprehensive D-Bus interface for application integration. Signal handling: SIGINT and SIGTERM trigger shutdown, SIGHUP reloads DNS server data and service definitions, and SIGUSR1** dumps cached resource records to syslog for debugging.
How do I run a basic avahi-daemon example?
Run `avahi-daemon` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --file=_FILE_ do in avahi-daemon?
Specify configuration file (default: /etc/avahi/avahi-daemon.conf)