Home > System Administration, Windows > lmhosts File

lmhosts File

A local hosts file used by Microsoft Wins Clients such as Microsoft Windows 98 or Windows NT to provide mappings of IP addresses to NT computer names (NetBIOS name). The lmhosts file is located in either the root Windows directory, the Windows\System32\drivers\etc directory, or Winnt\System32\drivers\etc depending on the version of Windows and is called “lmhost.sam“. The lmhosts file will likely already contain data in the file, such as commented instructions and examples similar to the below example.          localhost    #example of the local host      example    #example of a fake IP and name.

In the above two examples, you can see that we have specified the IP address, the name, and the # remark for that line. In the above example, “localhost” or “example” would be the NetBIOS name; therefore, when typing “localhost” or “example” in Internet Explorer, for example, the computer would attempt to resolve that name by accessing the IP address corresponding with that name.

This file is also commonly modified when unable to access or having difficulties with the DNS server, to help prevent access to a specific domain, and/or redirect the computer to a different location.

How do you edit this file?

  1. Locate and open the file. Because this file can be in different locations its usually easiest to simply open the Windows search and search for “lmhosts.sam” file. Additional information about finding files in Microsoft Windows can be found on document CHFIND.For users who are manually looking to locate the file below is a listing of the version of Windows and the location of the lmhosts file.

    Microsoft Windows 98


    Microsoft Windows 2000


    Microsoft Windows XP


  2. Once the file has been located right-click the file and select “Open With…” and if prompted select “Select the program from a list” and click Ok.
  3. In the listing of programs used to open the file scroll to the bottom of the list and highlight WordPad and click the Ok button.

Following the above steps should open the lmhosts.sam file in WordPad and allow you to add or remove content from the file.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: