Where is the hosts file win7 modify the hosts file graphic tutorial

  

For friends who like to reverse the computer, the hosts file may be familiar. In Windows, the hosts file size is only about 1K, but this file can be used to achieve some very amazing features, including making a web address, blocking the development of a website, and even blocking ads. For computer novice friends, modifying the hosts file is also very simple, just need to know where the hosts file is, how to simply modify it, let's take a look at it in detail.

Where is the hosts file? This article takes Win7 system as an example, XP, Win8 and Win10 systems, the operation steps are the same.

Hosts file path: C:\\WINDOWS\\system32\\drivers\\etc

The above C refers to the system disk, the general computer system is installed in the C drive, if your computer system is not installed In the C drive, please refer to the actual system drive letter.

Win7 modify the hosts file graphic tutorial

We can directly find the hosts file through the above file path, here Xiaobian teaches everyone to open the modified hosts file method in the fastest way.

1, open the run in the Win7 start menu, you can also use the [Win + R] combination shortcut to open quickly, then paste the hosts file location in the input box after opening, then the bottom " OK" as shown below.

2, you can quickly find the hosts file. Next, right click on the file, then select "Open" and then select to open using Notepad, as shown below.

3, after using Notepad to open, you can modify the hosts file. Modify it according to the features you want to implement. Here are a few examples.

Example 1: Specify the IP address of the visited website

Specify the IP address of the access computer Pepsi.com www.pc841.com: 119.188.139.154, just add the following sentence below the Hosts file:

119.188.139.154 www.pc841.com (note that there must be spaces between the IP and the URL), as shown below.

After the addition is complete, you can save it. After we go to the computer and ping www.pc841.com, we can see that the specified IP address is accessed, as shown in the figure.

This method of specifying the IP address by modifying the hosts file is sometimes useful. For example, everyone knows that Google can't open it in China. This is mainly because the domestic blocking of Google's large number of DNS leads to You can find some available Google server IPs that are not blocked. According to the above method, you can access Google by using the available IP address.

Modify the Host file to access Google


Example 2: Block the specified website

Sometimes, we want to prevent If you have some unhealthy websites on your child, you can add these URLs to the hosts file. After adding them, the specified websites will not be able to access them properly.

Modify the hosts file, it is very simple to block the website, just follow this format:

127.0.0.1 www.addressed URL.com (for example, Xiaobian wants to block Pepsi mobile phone) :m.pc841.com) The method of modifying the Hosts file is as follows.

If you need to add more than one, please match one in one line.

After the addition is completed and saved, try to open the Pepsi mobile phone version on the computer, and the website will not open normally, as shown below.

Detailed tutorial: How to block websites? Shielding website method summary

There are many other wonderful uses for modifying the hosts file, such as blocking video website advertisements, etc., I will not introduce them in detail here. I hope this article can help computer lovers.

Extended reading:

How to block Youku advertising How to get rid of video ads such as Youku

Copyright © Windows knowledge All Rights Reserved