Linux Hostname via Windows with a local VM

I’d much rather just reference the Linux machine using its hostname. This does not work initially, since Windows uses NetBIOS for its name service rather than TCP/IP host names. An easy way to get in on the NetBIOS action is to install Samba. While that may be overkill as a solution to this problem, it is helpful to have running when working with Linux machines in a Windows environment.

sudo apt-get install samba

And you’re done! Assuming the install finished successfully, the Samba services were started automatically. And, of course, assuming your Windows workgroup uses the default name WORKGROUP. If that’s true, Samba will use your machine’s host name as its NetBIOS name, and you should be able to ping the Linux machine now.

If you need configure the name of your workgroup or want to use a different NetBIOS name, edit the file /etc/samba/smb.conf and make sure this information is present:

workgroup = {WORKGROUP_NAME}
netbios name = {NAME_YOU_WANT}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Before you post, please prove you are sentient.

What color is a typical spring leaf?