Home  >  Article  >  Operation and Maintenance  >  How to modify the hosts file

How to modify the hosts file

藏色散人
藏色散人Original
2019-12-27 11:41:3215407browse

How to modify the hosts file

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn