The hosts file is a text that contains the corresponding IP address and the corresponding URL mapping list. Abnormalities in the hosts file will have a certain impact on the normal use of the computer, causing problems such as the computer not being able to connect to the Internet, the browser not being able to open web pages, etc. Hosts file configuration Abnormality leading to inability to access the Internet is a common computer problem. In this issue, the editor has sorted out the solutions to the problem of inability to access the Internet due to an abnormality in the Windows system hosts file. Friends who are troubled, come and take a look.
、
1. Click the search icon on the taskbar (you can also press Win S to open it), search box Enter cmd, then click Run Command Prompt Application as Administrator;
#2. The User Account Control window pops up, click Yes;
3. After opening the command prompt as an administrator, enter the following command:
for /f %P in ('dir %windir%\WinSxS\hosts /b /s ') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
Then press Enter to execute
4 , enter the letter a and press Enter;
##5. If there is a problem with the hosts file, after entering the letter a, it will be created, otherwise it will be overwritten. Finally, you can open the hosts file to see if it is normal;The above is the detailed content of How to solve the problem that the computer hosts file is abnormal and cannot access the Internet. For more information, please follow other related articles on the PHP Chinese website!