2011年12月23日星期五

Ping & access Windows PC from Linux via computer name instead of IP address

From Linux, when you tried to ping or access another Windows PC in the same local network using it's computer name, you will get "Unknown host" error and so on. You will also not able to access the website available from these Windows PC via their computer name such as http://windows-svr

To get that solved, install winbind in your linux. Then edit the file /etc/nsswitch.conf and add in "wins" in the line as follow:

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

and reboot your linux... Done!