Why can Windows machines resolve local names when Linux can't?

I'm not a network expert, and I'm also researching a LOT for answers in this topic. My current findings are:

  • Windows uses NetBIOS names, and such protocol, being a broadcast one, allows them to find each other without any central server.

  • Linux machines in modern distros uses natively a protocol called Avahi, which is also a server-independent, broadcast protocol. Local network machines have a suffix .local, so you can ping from Linux to Linux using ping hostname.local, or see them with avahi-discover package. some apps in Gnome use avahi to list machines in the network (for example, the Remote Desktop Viewer)

  • Installing SAMBA on a Linux machine will assign it a NetBIOS name (or, more technically, will make a Linux machine advertise itself in broadcast requests with their NetBIOS name, which is by default their hostname), and that allows Windows machines to find the Linux ones.

  • Gotcha: Although Linux machines with Samba will reply to NetBIOS protocol requests, with default settings in distros like Ubuntu it won't use NetBIOS as a method to resolve names, and that's why Linux machines can't "see" each other or the Windows machines. For that, you need to edit /etc/nsswitch.conf file and add wins to the list in this line:

    hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4

  • You may need to install winbind (and, if not installed automatically, libnss-winbind) package for the above to work.

  • So, for the visibility issue, you either install Samba on all Linux machines (and also edit /etc/nsswitch.conf to enable NetBIOS name resolution), or you install Avahi support in Windows machines.

  • As for file sharing, Samba provides Linux machines file-sharing capabilities with Windows. Theres no need to edit /etc/nsswitch.conf for Linux machines to see shared folders of each other and Windows (and vice-versa) in the "Network" section of Nautilus

I hope this helped! :D


By default, without a DNS server, windows can use NetBIOS (a Microsoft name resolution protocol) to discover the names of other windows systems local to their network. As mentioned in this answer, it looks like you need to setup SAMBA (or at least winbind) on the Linux side. Here is a basic set of instructions:

To enable Windows netbios name resolution from a Linux computer, make sure that Samba is installed (although the smb service does not need to be running). The Samba suite includes winbind, which enables Windows host names to be resolved. Then edit /etc/nsswitch.conf and change this line:

hosts: files dns

to this:

hosts: files dns wins

Then test by pinging the computer name of Windows machine on the LAN:

$ ping windowsbox

BTW, this has nothing to do directly with WINS. WINS is a NetBIOS server typically used in larger networks to cut down on broadcast traffic, provide a legacy centralized name resolution platform, and ultimately to enable systems on different networks to know each others' NetBIOS-name-to-IP mapping.

An alternative to SAMBA would be to setup a DNS server and ensure dynamic DNS updates are configured or that DHCP can register DNS records.


Most probably LLMNR.


You probably just need to set up Avahi/mDNS Resolution. It does kind of the same as LLMNR on Windows.