The mapping between the domain name and the IP address is specified in the Hosts file. If a domain name specifies an IP address in the hosts file, the system will not resolve its IP address through the DNS (Domain Name System) when accessing the domain name. Address, but directly access the specified IP address. In other words, with the help of the hosts file, we can bypass the DNS server and directly access some domain names.
In the case of Windows, the format of the Hosts file is <;<IP address> <domain name> <#comment>”, for example:
127.0.0.1 google .com # redirect google.com to 127.0.0.1
The following is the location of the hosts file in the common operating system:
1.Windows:%SystemRoot%\\system32\\drivers\\etc \\, such as C:\\Windows\\System32\\drivers\\etc\\2.Macintosh and iOS: /etc/hosts3.Symbian: C:\\system\\data\\hosts (Symbian OS 6.1– 9.0) and C:\\private\\10000882 \\hosts (Symbian OS 9.1+) 4.Android: /system/etc/hosts
Hosts files can be used for policing, such as blocking certain websites and setting their IP addresses to non-existent addresses; Or domain name hijacking, some virus programs will modify the hosts file, turn a domain name to a malicious website, and so on. The folder where hosts is located: Windows system hosts are located at C:\\Windows\\System32\\drivers\\etc\\hosts Android (Android) system hosts are located at /system/etc/hosts Mac (Apple) system hosts are located in the same way as Linux /etc/hosts iPhone (iOS) System hosts are located in /etc/hosts like Linux Mac. Linux system hosts are located in /etc/hosts. You can also convert text encoding and line break formats yourself using Notepad++. Of course, the old D share is converted. The method that takes effect after modifying the host: Windows Start->Run->Enter cmd-> Enter
Copy code
in the CMD window as follows: ipconfig /flushdns Linux terminal input
Copy the code
The code is as follows: sudo rcnscd restart For the systemd distribution, use the command
Copy the code
The code is as follows: sudo systemctl restart NetworkManager If you don't understand, please try the Mac OS X terminal input
Copy Code
The code is as follows: sudo killall -HUP mDNSResponder Android Open Flight Mode-> Turn off Airplane Mode General Method to Unplug Network Cable (Disconnected Network) -> Plug Network Cable (Reconnect Network) (Sometimes You don't need to do this anymore, anyway, the old D rarely refreshes the DNS, and the refresh can be parsed faster)
Even if the U disk installation system has occupied the mainstream, but the stability of the CD is b
In the latest Windows 10 technology preview version of Build 9860 released by Microsoft today, an up
Whether you are active or passive, Windows 10 system should already occupy your home PC? What, Win10
Solve the blurring method of 5-7 fonts under WinXP system
How Win10 deletes and rebuilds indexes to speed up searches
Win8 also has a desktop calendar. Soft media time 3.08 official release release
Win10 preview version 9926 setting tutorial win10 system latest version settings detailed
Windows10 official version upgrade known problem summary
Win10 can not create a restore point error code 0x80042306 how to do?
How to manually repair WinXP+Vista dual system boot file
What's new in Win10 Mobile 10572 Preview? Update summary
How to upgrade Win10 Insider Preview to win10 Build 10547?
What if the win7 computer shortcut is gone? How to lock a computer icon to the taskbar
Win10 preview version 10036 official image download address win10 10036 leaked version download
How to recover the data loss of Win8 system hard disk?
Legacy files after software uninstallation
Windows 7/8.1 upgrade Windows 10 Build 9926 tutorial
Optimize Win 2003 server IIS6.0 to reduce WEB pressure
VideoStudio how to edit video? VideoStudio Clip Video Tutorial
Win8/Win8.1 version Nextgen Reader limited download-free
Open all browsers blank, no error prompts resolved
What if the Win10 app store can't open? Try removing the store app cache to resolve