Disabling the Avahi daemon
Avahi is a daemon that allows you to automatically discover network resources and to connect to it.
Avahi deals with the following:
- To assign an IP address automatically even without the presence of a DHCP server
- To act as a DNS (each machine can be accessed by the name nomMachine.local)
- Publishing services and easy access (to the local network machines are warned of the arrival or departure of a service).
This facilitates file sharing, printer, etc..
Avahi is an implementation of Zeroconf protocol, compatible with Bonjour / Rendez-Vous d'Apple.
However:
- It consumes little memory (about 248 KB).
- It opens 2 network ports (UDP 5353 and 32768)
- It has been reported in some cases a slower network.
Ubuntu 7.04
If you do not need and you want to disable it, you have a problem:
Even if you uncheck in the list of services (Menu System> Administration> Services), will continue to start!
To really turn it off, edit the file /etc/default/avahi-daemon as root:
sudo gedit /etc/default/avahi-daemon
Change the line:
AVAHI_DAEMON_START=1
To:
AVAHI_DAEMON_START=0
Avahi Daemon wont run at the next startup.
Ubuntu 7.10,8.04 and 8.10
You can go through the service panel to cut Avahi normally:
Menu System> Administration> Services
Other Debian systems and derivatives
The name daemon may be different but the method is the same for Debian based systems
Another method is much simpler to run a command that will delete the links to the daemon
sudo update-rc.d -f avahi-daemon remove
To recreate links use this command:
sudo update-rc.d avahi-daemon defaults
Note: Under Ubuntu 7.04, the command
sudo update-rc.d-f avahi-daemon remove not enough to eliminate the Avahi daemon: It will start anyway. Use the tip of AVAHI_DAEMON_START = 0.
Links
About Avahi, there are debian packages available:
- Gnome applet service-discovery-applet to discover services available on the network and connect easily.
- The avahi-discover program allows you to browse the available services.
- gshare lets you easily share files via FTP with Avahi.
- gnome-user-share allows to easily share files over WebDAV (with Apache2) with Avahi.