hosts文件配置异常不能上网怎么恢复?
hosts文件是电脑中关于网络连接重要的文件,而不少用户最近在使用电脑的时候,电脑提示hosts文件配置异常导致不能上网,遇到这种情况我们应该怎么解决呢?其实方法非常的简单,下面小编就带着大家一起具体看看吧!
操作方法:
1、在任务栏的搜索框输入
cmd
鼠标右键点击“命令提示符”,选择“以管理员身份运行”。

2、将出现“用户账户控制”界面,点击“是”。

3、在“管理员:命令提示符”中输入:
- 01for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
然后按下回车键(键盘上的Enter按键)。

4、需要等待一会,将出现一些提示。
(若是hosts文件丢失将会创建,否则将覆盖)
然后输入:
a
然后按下回车键(键盘上的Enter按键)。

5、完成后将打开hosts文件,将其关闭即可。
