← 返回命令列表

Linux command

avahi-browse 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Browse all

avahi-browse -a -r

Example

avahi-browse -a -t -p

Example

avahi-browse _http._tcp

Example

avahi-browse -D

Example

avahi-browse -a --domain=[example.local]

Example

avahi-browse -a -r -l

说明

avahi-browse displays services and hosts exposed on the local network via mDNS/DNS-SD (Multicast DNS Service Discovery). It is compatible with Apple's Bonjour/Zeroconf protocol. By default, the tool runs continuously and displays services as they appear or disappear on the network, prefixed with "+" for new and "-" for removed entries. When used with --resolve, it also looks up hostnames and port numbers for discovered services. The --terminate flag causes it to exit after dumping all currently known services, which is useful for scripting.

参数

-a, --all
Show all services
-r, --resolve
Resolve discovered services to addresses and ports
-l, --ignore-local
Ignore services on the local machine
-t, --terminate
Terminate after dumping a list (don't wait for more)
-p, --parsable
Output in parsable format for scripts
-D, --browse-domains
Browse for domains instead of services
--domain _domain_
Limit search to a specific domain
-f, --no-fail
Don't fail if the daemon is not running; wait until it appears
-k, --no-db-lookup
Don't look up service types in the service type database
-b, --dump-db
Dump the service type database
-v, --verbose
Enable verbose output

FAQ

What is the avahi-browse command used for?

avahi-browse displays services and hosts exposed on the local network via mDNS/DNS-SD (Multicast DNS Service Discovery). It is compatible with Apple's Bonjour/Zeroconf protocol. By default, the tool runs continuously and displays services as they appear or disappear on the network, prefixed with "+" for new and "-" for removed entries. When used with --resolve, it also looks up hostnames and port numbers for discovered services. The --terminate flag causes it to exit after dumping all currently known services, which is useful for scripting.

How do I run a basic avahi-browse example?

Run `avahi-browse -a -r` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a, --all do in avahi-browse?

Show all services