What is LMHOSTS file in Windows?

Channel:
Subscribers:
1,660
Published on ● Video Link: https://www.youtube.com/watch?v=C_WsyrBJ6vI



Duration: 2:25
1 views
0


Find out What LMHOSTS file in Windows is.

i. The LMHOSTS and HOSTS files are both used to resolve hostnames to IP addresses. However, they have different purposes and are used in different ways.

The LMHOSTS file is used to resolve NetBIOS names to IP addresses. NetBIOS is a legacy protocol that was used for name resolution in early versions of Windows. The LMHOSTS file is a text file that contains a list of NetBIOS names and their corresponding IP addresses.

The HOSTS file is used to resolve hostnames to IP addresses. Hostnames are more commonly used than NetBIOS names, and the HOSTS file is more commonly used than the LMHOSTS file. The HOSTS file is also a text file, but it can contain both NetBIOS names and hostnames.

The LMHOSTS file is typically used in conjunction with WINS, which is a more efficient way to resolve NetBIOS names to IP addresses. However, the LMHOSTS file can be used as a backup if WINS is unavailable.

The HOSTS file can be used on its own, but it is typically used in conjunction with DNS, which is the most common way to resolve hostnames to IP addresses.

In general, you should only use the LMHOSTS file if you are specifically troubleshooting a problem with NetBIOS name resolution. Otherwise, you should use the HOSTS file or DNS.

Here is a table summarizing the differences between the LMHOSTS and HOSTS files:

| Feature | LMHOSTS | HOSTS |
|---|---|---|
| Purpose | Resolve NetBIOS names to IP addresses | Resolve hostnames to IP addresses |
| Format | Text file | Text file |
| Location | `C:\Windows\system32\drivers\etc\lmhosts` | `C:\Windows\system32\drivers\etc\hosts` |
| Use | Used in conjunction with WINS or as a backup | Used on its own or in conjunction with DNS |