What should I do if my win11 computer has abnormal hosts file configuration and cannot access the Internet?

PHPz
Release: 2024-09-03 09:30:42
Original
557 people have browsed it

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".

win11电脑hosts文件配置异常无法上网怎么办

2. The "User Account Control" interface will appear, click "Yes".

win11电脑hosts文件配置异常无法上网怎么办

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).

win11电脑hosts文件配置异常无法上网怎么办

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).

win11电脑hosts文件配置异常无法上网怎么办

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

win11电脑hosts文件配置异常无法上网怎么办

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!

source:xitongzhushou.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template