Show Windows Hostnames in Linux

I already talked about some things that didn’t work as “expected” and among of these the fact that my new linux computer doesn’t “see” other windows computers running in the same network. I had to input the IP address of each pc. And it was strange since even my android phone could do it easily. Anyway, I found this tutorial How to enable Linux machines to resolve Windows hostnames

Using the command line is something you’ll get used to in linux ;)

So let’s start :

  • Install winbind and libnss-winbind :
sudo apt install winbind libnss-winbind
  • Open the file :
sudo nano /etc/nsswitch.conf
  • Look for this line :
hosts: files mdns4_minimal [NOTFOUND=return] dns
  • Add this at the end of this line :
 wins mdns4
  • So it will look like this :
hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4
  • Save (ctrl+s) and and close (ctrl+x)

  • And that’s it

Copyright

Comments