To disable “avahi-daemon” without uninstalling, you need to first stop the “avahi-daemon” service and then disable it, which will prevent it from starting automatically at boot.
$ sudo systemctl stop avahi-daemon
$ sudo systemctl disable avahi-daemon
For double assurance, you can mask the “avahi-daemon” service, which will make it impossible to start no matter what service or dependencies require that service.
$ sudo systemctl mask avahi-daemon
You can finally confirm that the “avahi-daemon” service isn’t running and is disabled.
$ sudo systemctl status avahi-daemon
$ sudo systemctl is-enabled avahi-daemon
Output:
The steps mentioned in this article will stop the “avahi-daemon” service across various Linux distributions where it comes preinstalled, such as Debian, Ubuntu, Linux Mint, Red Hat, Fedora, Raspberry Pi, etc.
However, should you stop the “avahi-daemon” service? Does it make a difference, and what precisely is it? If you have these questions, then check out the next section.
What is Avahi-Daemon in Linux?
The Avahi Daemon is a service within Avahi running on Linux that helps devices and applications discover each other on the local network without requiring additional software or drivers.
It simplifies the process of connecting multiple devices, such as IoTs, smart TVs, printers, and other network services that require communication, without having to deal with complex configurations.
When the service is active and enabled, it continuously broadcasts the IP address on the local network, potentially posing a security risk, particularly in open or untrusted environments.
If you don’t need this service, disabling it will also free up system resources. Additionally, some workplaces strictly prohibit auto-discovery, so you can also disable it there.
However, when you stop the “avahi-daemon” on your computer, all devices on the network using it will continue to send requests, and the list of services can quickly rebuild once you start your “avahi-daemon” service.
How to Enable Avahi-Daemon in Linux
If you’re on a local network and want the “avahi-daemon” service to keep running in the background so that network devices can find each other, run the following command:
$ sudo systemctl unmask avahi-daemon
$ sudo systemctl enable avahi-daemon
$ sudo systemctl start avahi-daemon
Finally, confirm that the “avahi-daemon” service is running and is enabled.
$ sudo systemctl status avahi-daemon
$ sudo systemctl is-enabled avahi-daemon
Output:
Final Word
Modern systems implement additional security measures to prevent any type of leak, so not disabling these services is okay. However, if you are particularly concerned about network security and prefer to keep your system isolated from other devices or applications, then you can go ahead and stop it.
If you have any questions or queries regarding the topic, then feel free to tell us in the comment section.
Till then, peace!
Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.