Solving the problem of being unable to access the Internet due to abnormal configuration of Win11 hosts file. When the hosts file configuration on a Windows 11 computer is incorrect, it may result in the inability to connect to the Internet. The solution to this problem is very simple, and PHP editor Strawberry will introduce the steps in detail in this article. This article will guide you: Use the command prompt to enter the User Account Control interface to correctly configure the hosts file. By following these steps, you can quickly solve the problem of abnormal hosts file configuration and restore your Internet connection.
Analysis of the problem of abnormal configuration of win11 computer hosts file and inability to access the Internet
1. Enter: cmd in the search box of the taskbar
Right-click "Command Prompt" and select " Run as administrator".
2. The "User Account Control" interface will appear, click "Yes".
3. Enter in "Administrator: Command Prompt":
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).
4. You need to wait for a while and some prompts will appear.
(If the hosts file is missing, it will be created, otherwise it will be overwritten)
Then enter:
a
and then press the Enter key (on the keyboard Enter key).
5. After completion, the hosts file will be opened, just close it.
The above is the detailed content of What should I do if my win11 computer has abnormal hosts file configuration and cannot access the Internet?. For more information, please follow other related articles on the PHP Chinese website!