Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an easy way to allow my other computers to resolve my hostname over the network without having them edit their hosts files or their DNS settings? Some of the computers are on Windows.

share|improve this question
I was under the impression that most commercially available home routers do this for you, provided that you use the built-in DNS proxy as the DHCP/static DNS server for your network. – crasic Jan 6 '11 at 21:07
The best answer from a similar question: – nobar Jul 14 '14 at 15:52
up vote 9 down vote accepted

To resolve Avahi hostname, other computers should have libnss-mdns Install libnss-mdns installed.

Another option, if you are the network administrator is to distribute a private DNS address by DHCP (I your computers are configured by DHCP). For small network, dnsmasq Install dnsmasq is good combined package (DNS+DHCP). It allows you to serve simply your /etc/hosts to the network.

share|improve this answer
sudo apt-get install libnss-mdns on the (Ubuntu) computer that you want to share. This will start the 'Avahi mDNS/DNS-SD Daemon: avahi-daemon' and enable discovery by (hostname).local on computers with compatible client software. – nobar Jul 14 '14 at 15:48

In mixed network environments you can do this with name resolutions from Avahi/Zeroconfig that would resolve in Mac-OS as well as in Windows (when Bonjour is running). See also this answer.

share|improve this answer

In all recent Ubuntu installs you can use hostname.local and it just works. I believe this means mDNS is set up automatically, but as it's always just worked (except with some routers in some hotels, where I'd get a notification about it being disabled because of a broken router), I haven't had to dig in.

share|improve this answer

If you install SAMBA then Windows machines that don't speak mDNS will resolve your hostname using that.

share|improve this answer
Excellent suggestion! Note that from the Windows client, you don't use the ".local" extension. – nobar Sep 4 '11 at 23:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.