How to disable avahi-daemon without uninstalling it

sudo systemctl disable avahi-daemon to disable boot time startup.

A few other options are systemctl list-units for a list of all known units, systemctl enable to enable boot time startup, systemctl start to start the service from terminal, but not enable boot time loading and systemctl stop to stop a service which has been started. man systemctl and man systemd will provide complete set of options.

Most (not all though) modern Linux distributions have switched or are switching to systemd from the traditional SysV init scripts. Also, http://blog.jorgenschaefer.de/2014/07/why-systemd.html covers some of the basics of systemd.


My solution was to edit /etc/avahi/avahi-daemon.conf and make the following change: use-ipv4=no use-ipv6=no

Then do a root@magrf# service avahi-daemon restart

Verify that avahi daemon is stopped: root@magrf# ps -ef | grep avahi root 8311 8220 0 17:50 pts/0 00:00:00 grep avahi root@magrf#

As you can see, avahi processes are not running. If restart fails, try an explicit root@magrf# service avahi-daemon stop root@magrf# service avahi-deamon start

Restart is important so avahi could re-read configuration and shutdown service processes. Then it had performed a graceful exit.


You can disable it with:

systemctl disable avahi-daemon.socket

And

systemctl disable avahi-daemon.service