How to disable avahi-daemon: Linux, Ubuntu, CentOS
The Avahi daemon is a default daemon in Linux and uses system resources and reduces the network performance. If you don't need these features, Avahi can be disabled and we'll show you how.
What is the Avahi daemon?
The Avahi daemon is a default daemon in Linux and uses system resources and reduces the network performance. The Avahi daemon discovers network resources, allocates IP addresses without the DHCP server, makes the computer accessible by its local machine name by acting as a DNS server and facilitates sharing of files and printers.
Its primary roles are to:
- Assign an IP address automatically, even without the presence of a DHCP server.
- Act as DNS (each machine is accessible by the name nameMachine.local).
- Publish services and facilitate access.
Avahi is an implementation of the Zeroconf protocol.
What are the possible drawbacks of Avahi?
- It takes up memory (about 248kb)
- It opens 2 network ports (UDP 32768 and 5353)
It has been reported in some cases to decrease network performance.
Disabling the Avahi daemon cannot be done by un-checking it from the list of system services. To disable Avahi from Linux distributions, the avahi-daemon file has to be modified.
How to disable the Avahi daemon?
Under Ubuntu 7.04
If you want to disable it it is not enough to disable it from the list of services. You need to:
- Edit the /etc/default/ avahi-daemon file:
sudo gedit /etc/default/avahi-daemon
- Change the line: AVAHI_DAEMON_START = 1
- to: AVAHI_DAEMON_START = 0
- Reboot your system
Note: The command sudo update-rc.d-f avahi-daemon remove is not enough to disable the Avahi Daemon.
Under Ubuntu 7.10
- Go to the list of services to disable Avahi:
- System Menu > Administration > Services
Under Debian systems
The name of daemon may be different but the method remains the same for Debian-based systems:
sudo update-rc.d -f avahi-daemon remove
- To recreate the used links:
sudo update-rc.d avahi-daemon defaults
On CentOS, you can disable the service using the following:
# service avahi-dnsconfd stop # service avahi-daemon stop
- To make these changes permanent across reboots, run the following:
# chkconfig avahi-daemon disabled # chkconfig avahi-dnsconfd disabled
- There are some Debian packages available for Avahi:
The service-discovery-applet allows you to discover available services on the network and connect easily.
The avahi-discover application allows you to browse the available services.
- gshare allows you easily share files via FTP with Avahi.
gnome-user-share can easily share files via WebDAV (Apache2) with Avahi.