Most Linux distributions come with the ping utility, but unlike the Windows ping command, it does not get replies if we used a Windows HOSTNAME or NetBIOS name.
The usual workaround most people would do is add the hostnames in their Linux machine's /etc/hosts file in the format
But this will become too cumbersome to maintain when the machine's IP Address changes or when there are too many hosts for you to handle manually. The other option is a local DNS but that is unnecessary in a small network.
The simplest solution to this lies in the nsswitch.conf configuration file.
Open the file with your favourite Editor (you need to use sudo or be root to edit) and look for a line that begins with "hosts:". On my system this was:
Just add the wins at the end. So my line will be
hosts: files dns
Now try pinging a windows Machine using only the windows Hostname and it should be working all fine.
hosts: files dns wins