LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

avahi-browse

Browse for mDNS/DNS-SD network services

TLDR

Browse all services and resolve addresses
$ avahi-browse -a -r
copy
Browse all services, terminate after dump (for scripts)
$ avahi-browse -a -t -p
copy
Browse for a specific service type
$ avahi-browse _http._tcp
copy
List domains
$ avahi-browse -D
copy
Search specific domain
$ avahi-browse -a --domain=[example.local]
copy
Browse and ignore local services
$ avahi-browse -a -r -l
copy

SYNOPSIS

avahi-browse [OPTIONS] [SERVICE-TYPE]

DESCRIPTION

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.

PARAMETERS

-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

INSTALL

sudo apt install avahi-utils
copy
sudo dnf install avahi-tools
copy
sudo apk add avahi-tools
copy
sudo zypper install avahi-utils
copy

CAVEATS

Requires the Avahi daemon to be running. Services must be advertised via mDNS to be discovered. Network configuration and firewall settings may affect discovery.

HISTORY

avahi-browse is part of the Avahi package, providing mDNS/DNS-SD service discovery on Linux, compatible with Apple's Bonjour.

SEE ALSO

Copied to clipboard
Kai