avahi-browse is a command-line tool in Linux that is used to browse the network for available services that are advertised using the Avahi service discovery protocol. Avahi is a free, open-source implementation of the Zeroconf protocol, which allows devices on a local network to automatically discover and communicate with each other without the need for a central server or configuration.
avahi-browse can be used to discover services on the local network, such as printers, web servers, or file servers, and display information about them, such as their type, name, and IP address. It can also be used to monitor the network for changes in the availability of services, and to receive notifications when services are added or removed.
You can use avahi-browse to discover services on the local network by running the avahi-browse command with the appropriate options. For example, to discover all available services on the local network, you could use the following command:
# avahi-browse --all
To use avahi-browse, you will need to have the avahi-utils package installed on your Linux system. You can install avahi-utils using the package manager for your specific distribution of Linux. For example, on an Ubuntu system, you can use the apt command to install avahi-utils:
# apt install avahi-utils
For more information on using avahi-browse, you can consult the avahi-browse documentation or use the avahi-browse –help command to view a list of available options and usage examples.
avahi-browse Command Examples
1. List all services available on the local network along with their addresses and ports while ignoring local ones:
# avahi-browse --all --resolve --ignore-local
2. List all domains:
# avahi-browse --browse-domains
3. Limit the search to a particular domain:
# avahi-browse --all --domain=domain