Avahi is installed by default in Ubuntu - ever since “I don’t know when…” - i.e. I’ve been using it since around 14.04 - I know it’s installed by default with a base install of Ubuntu since at least 16.04 - so its base requirements will be installed on your xubuntu 20.04 system…
e.g. my Ubuntu 20.04 desktop at my desk at work :
â•â”€x@tethys ~
╰─➤ apt list --installed |grep -i avah
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
avahi-autoipd/focal,now 0.7-4ubuntu7 amd64 [installed]
avahi-daemon/focal,now 0.7-4ubuntu7 amd64 [installed]
avahi-utils/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-client3/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-common-data/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-common3/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-compat-libdnssd1/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-core7/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-glib1/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-gobject0/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
libavahi-ui-gtk3-0/focal,now 0.7-4ubuntu7 amd64 [installed,automatic]
Some components that don’t get installed by default are packages like avahi-discover (you shouldn’t need it)…
Summary : it will have been installed by default… you don’t need to run anything special - it’s part of “zeroconf” so there should be nothing to configure… just remember to append “.local” onto your LAN hostnames…
Test it by trying to ping some other Linux box on your LAN like :
ping myservername.local
By default Ubuntu should put this in your /etc/nsswitch.conf file :
hosts: files mdns4_minimal [NOTFOUND=return] dns
The key value here being “mdns4_minimal”… But you shouldn’t even need to touch this file…
Note : I can ping my Windows 10 laptop at my desk from my Linux laptop at my desk on my work’s LAN :
â•â”€x@tethys ~
╰─➤ ping REDACTO.local
PING REDACTO.local (10.16.8.99) 56(84) bytes of data.
64 bytes from REDACTO.corp.REDACTO (10.16.8.99): icmp_seq=1 ttl=128 time=0.594 ms
64 bytes from REDACTO.corp.REDACTO (10.16.8.99): icmp_seq=2 ttl=128 time=0.735 ms
^C
--- ping REDACTO.local statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.594/0.664/0.735/0.070 ms
(note - I changed the real names to “REDACTO” to protect my company details)
(but not the other way - i.e. I cannot “ping tethys.local” from my corporate SOE Windows 10 laptop - but I’ve been able to get Avahi *.local names to resolve from Windows 7 stuff on my home LAN)
– edit –
Note - you may get unexpected results if for example - the host you’re trying to get to has two interfaces on the same IP network / LAN - e.g. a machine that has WiFi and ethernet connection, connected simultaneously… usually, but not always, it will default to the ethernet address first - but - it may not, e.g. if your ethernet switch is power cycled, and ethernet goes down, then re-connects - avahi may resolve to the wifi IP address first… YMMV (your mileage may very) - but this stuff is mostly plug and play you should never have to look under the hood