How to modify the hosts file?
How to modify the hosts file
Since the hosts file is a system file, administrator rights are required to modify it.
The first method: first change the permissions to administrator permissions, and then modify them.
Second method: First copy the hosts file to the desktop. At this time, administrator rights are no longer required, so you can modify it. After modification, drag it back to the original directory and replace the original file. document.
Related recommendations: Where is the location of the hosts file?
hosts file modification example:
202.108.22.5 www.baidu.com
As shown above, we are In the local hosts file, a mapping relationship is established between Baidu's IP address and Baidu's domain name, which plays the role of "speeding up domain name resolution" because there is no need to request a DNS server! In addition, if we want to comment it, we can just add the # symbol in front, for example:
#202.108.22.5 www.baidu.com
The above is the detailed content of How to modify the hosts file. For more information, please follow other related articles on the PHP Chinese website!