The LMHOSTS file is a plain text file, and Microsoft provides a sample program LMHOSTS. SAM, located in the directory C:\WinNT\System32\Drivers\Etc (like the previous example, our path here is adopted by the "Blue Net Lab", and friends can change it flexibly according to their actual installation). If we need to enable LMHOSTS file query (as to when this parsing method will be used, we will talk about it later), we should rename it LMHOSTS. Of course, the recommended method is to make a copy (that is, save it as LMHOSTS), thus avoiding the trouble of having to recover the original file from the installation CD.
To sum up, it can't replace the host to meet the requirement of changing IP into domain name. You can create a hosts.txt and write it in the following format:
127 . 0 . 0 . 1 www.baidu.com
# 127 . 0 . 0 . 1 www.sina.com
The first line is an exception. The application of this machine 127.0.0. 1 will be opened within 0/00 minutes, and if it is not opened, an error connection will be reported.
The second line "#" indicates comments.