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 of the "ld" ; OK & rdquo; as shown below.
2, you can quickly open the hosts file. Next, right click on the file, and then select “Open” and then choose to open using Notepad, as shown below.
3. After opening in Notepad mode, you can modify the hosts file. Modify it according to the function you want to implement, as shown below.
Example 1: Specify the IP address of the visited website
Specify the IP address of the access to this www.jb51.net: 119.188.139.154, just add the following sentence below the Hosts file:
119.188.139.154 www.jb51.net (note that there must be spaces between IP and URL), as shown below.
After the addition is complete, you can save it. After we go to the computer and ping www.jb51.net, we can see that the access is the specified IP address, 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, in order to prevent children from having some unhealthy websites, we can add these URLs to the hosts file, add After that, the specified website will not be accessible.
Modify the hosts file, it is very simple to block the website, just follow this format:
127.0.0.1 www.The URL to be blocked.com (for example, to edit this phone: M.jb51.net) The method of modifying the Hosts file is as follows.
If you need to add more than one, please correspond to one in one line.
After adding and saving, try to open this version of the phone in your computer, 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
win7 Ultimate use popularity is increasing, the original installed genuine win7 system is inactive,
At the Lenovo Tech World conference held recently, Lenovo released a series of hardware products suc
The latest Windows8.1 system introduces a very convenient feature: credential manager, which can sto
How to use the Windows 7 system problem step recorder
Win7 system often appears blue screen prompt error code 0x0000007a reasons and three solutions
Analysis and solution to the problem that U disk cannot be formatted under Win8 system
Win7 system adds printer without Print Spooler service without registry solution
Win10 official version settings can not be started and opened normally? This gadget can solve
Windows Server 2003 switch machine optimization skills
What new bugs will appear after Win10 preview 14251 update? Known issues summary
Win10 first anniversary update 14352, Edge browser added support for H.264/AVC video standard
Win10 system can not run the batch file how to do Win10 can not run the green batch file solution
Microsoft is releasing a June security update: 2 serious vulnerabilities
Win7 system often automatically boot problem solution
Win7/Win8 desktop right button no "new" Restore desktop right click new method
Windows 7 listed hackers have appeared a lot of viruses
Win8 system screen display direction setting tutorial
Win10 Xiaona has no sound how to do
Explain the difference between Windows 8 and Windows RT
Windows 7 adjust partition function
What should I do with Windows 7 operating system?
Through resetting a move to solve various bugs in win10 win10bug solution tutorial