Home >Computer Tutorials >System Installation >How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

WBOY
WBOYforward
2024-02-03 09:03:021377browse

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.

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

How to solve the problem of abnormal computer hosts file and unable to access the Internet

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;

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

#2. The User Account Control window pops up, click Yes;

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

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

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

4 , enter the letter a and press Enter;

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

##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;

How to solve the problem that the computer hosts file is abnormal and cannot access the Internet

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!

Statement:
This article is reproduced at:53xt.com. If there is any infringement, please contact admin@php.cn delete