I’ve always wished I could just use my Windows computers name when im trying to VNC in or trying to reference it’s network address for other reasons when connecting in from my Ubuntu computer, like it works in Windows. I’ve been spoiled by the fact that I can usually just type ‘ping ComputerName’ from my windows computer instead of having to go look up the ip and ping it that way from my Linux machine. So, how do I go about recreating that in Linux? Pretty easy actually. You need to have Samba and its libraries installed, which they are usually are by default. Then all you have to do is edit /etc/nsswitch.conf and add the word wins to the end of the hosts list. That should be it! You should be able to go to terminal and ping all the Windows computers on your network by their WINS name.

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference’ and `info’ packages installed, try:
# `info libc “Name Service Switch”‘ for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns mdns4 wins
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis