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
QQ conversation icon is missing solutionTencent has released a new batch of wireless interconnection
As a new generation of Microsoft operating system, Win7 has made great improvements in many
With the popularity of windows7 system, the newly installed computers are also WIN7 systems, but the
Win7 thumbnail preview function I believe that people who have used win7 system are familiar, the so
New Windows 7 Features System Window Smart Arrangement
Win7 system boot for the first time into the DNF card solution
Win7 Virtualization Virtual Machine Creation Strategy
Using Win7 Remote Desktop to help your family repair computers in the company
Make Windows 7 more convenient to set up four settings
Windows 7 Comic Album: Photo Change Film
Wonderful use of Windows7 shortcuts to optimize game office efficiency
Teach your Win 7 system security method of (2)
One computer two screens Win7 dual screen one button switching
Win7 "cannot find the project" error solution
Five Wonders for Vista and Windows 7 Security "Adding Bricks and Tiles"
Windows10 digital signature can not be installed how to do
After the Win10 system notebook is turned on, the black screen and the fan do not turn. How to do
What if the win10 browser can't be opened?
Modify Vista "Recently Open Project" display number
How to directly upgrade the win8 system to win10 system
Small size Surface tablet will be launched in a few weeks
U disk inserted into the win7 system computer after the fake death how to do
How to set the "sleep wake-up password" in Windows 8.1 system?