So in windows, if I typed ping familyroom, it would tell me that my PC in the family room is (DHCP assigned address that isn't in any DNS)

I'm running a new install of Ubuntu 14.04 Trusty Tahr LTS, and if I try to ping familyroom, I get unknown host. But, if I try to ping familyroom.local, I get a successfully response from that same IP address.

now I realize that I can just use the FQDN including the .local domain, but I'm lazy, and I'm trying to get Ubuntu 14.04 to work as well as Windows 7 did for me, and this is just one more nit-picky thing that irks me.

As a test, I added a search local to a new /etc/resolvconf/resolve.conf.d/tail file and resolvconf -u, but I get the same result. I assume this is due to "zeroconf" doing the name resolution for .local, but I don't know where to go from here to fix.

EDIT: Based on the help from @heemal, I now realize that Link Local resolution comes from Avahi, so I am focused on trying to get the Avahi name resolution to look up short-named hosts, or find an alternative to Avahi.

In the /etc/nsswitch.conf file, I attempted to add the full MDNS functionality of Avahi for DNS not found addresses.

Original hosts definition: `hosts: files mdns4_minimal [NOTFOUND=return] dns`
Unchanged results using: `hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4`

Now in Windows, I see that this Link Local resolution is coming via IPv6, and I wonder if there are improvements in the specification for IPv6 that could help me out here.


If you add something on /etc/resolvconf/resolve.conf.d/{head, base, tail} then the name resolution will be carried out by resolvconf, not by avahi-daemon hence just adding search local is not resolving the name.

To get the search domain working you need to set up a DNS server that will give response to your queries after the domain name being appended properly by your system.

Another option would be to add the entries in your /etc/hosts file like:


Now if you ping familyroom you will get the response.

By far the laziest option would be to add an alias like this:

alias familyroom='ping familyroom.local'

in the ~/.bashrc file. Now source ~/.bashrc and you can just type familyroom to send the ICMP echo request to the device.

| improve this answer | |
  • That doesn't really fix the Link-Local name resolution in a DHCP network, it's a workaround that requires DNS and static IPs. Good idea, but not quite what I'm looking for. – Mike Tosh Feb 27 '15 at 14:17
  • @MikeTosh: Whats the output of grep "^hosts:" /etc/nsswitch.conf? – heemayl Feb 28 '15 at 13:01
  • @Fabby, setting up a DNS server is not the answer to my question. The .local domain is a dynamical environment, and a static DNS is quite the opposite of what I'm trying to accomplish. I can access all of the hosts on my network if I include the .local extension, I'm just looking to figure out if Ubuntu, like Windows and Macs already do, can attempt a ZeroConf lookup using the .local domain if the hostname isn't resolved using other means, such as DNS and /etc/hosts. – Mike Tosh Mar 5 '15 at 13:13
  • @heemayl, this is a clean install of 14.04 so whatever the default setting is should be there, but I will get the answer as soon as I reboot into Linux. (I have Virtualbox set up to give my Linux in a VM too, but my laptop is just too slow to use it) – Mike Tosh Mar 5 '15 at 13:13
  • @MikeTosh: OK, that's WINS... (and not obvious from your original question that you're looking for a dynamic environment) So you need to activate a WINS server on your network. On Ubuntu that is done on the samba server! Do you have samba running??? – Fabby Mar 6 '15 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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