Home  >  Article  >  Computer Tutorials  >  How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

PHPz
PHPzforward
2024-02-03 16:05:271310browse

php editor Xiaoxin introduces you to a common problem: the solution to the abnormal configuration of the hosts file on a win11 computer that results in the inability to access the Internet. When using the Win11 system, sometimes you may encounter incorrect or abnormal configuration of the hosts file, resulting in the inability to access the Internet normally. This problem may occur during system upgrades, software installations, or virus infections. Fortunately, there are some simple steps we can take to fix this problem and restore normal Internet functionality. Next, we will introduce the solution to you in detail, hoping to help you.

win11 computer hosts file configuration abnormality and unable to access the Internet problem analysis

1. In the search box of the taskbar, enter: cmd

right-click the command prompt and select Run as administrator.

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

#2. The user account control interface will appear, click Yes.

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

3. In the administrator: command prompt, enter:

01for /f %P in ('dir %windir%WinSxShosts /b /s ') do copy %P %windir%System32driveversetc & echo %P & Notepad %P

and then press the Enter key (Enter key on the keyboard).

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

#4. You need to wait for a while and some prompts will appear.

(If the hosts file is lost, it will be created, otherwise it will be overwritten)

Then enter:

a

and then press the Enter key (on the keyboard Enter key).

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

5. After completion, the hosts file will be opened and just close it.

How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?

The above is the detailed content of How to solve the problem of abnormal configuration of hosts file on win11 computer and unable to access the Internet?. For more information, please follow other related articles on the PHP Chinese website!

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