15

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.

2
  • 1
    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, 2011 at 21:07
  • The best answer from a similar question: askubuntu.com/a/2632/11522 Jul 14, 2014 at 15:52

4 Answers 4

10

To resolve Avahi hostnames, other computers should have 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 a small network, dnsmasq is good combined package (DNS+DHCP). It allows you to serve simply your /etc/hosts to the network.

1
  • 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. Jul 14, 2014 at 15:48
8

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.

6

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.

2

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

1
  • Excellent suggestion! Note that from the Windows client, you don't use the ".local" extension. Sep 4, 2011 at 23:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .