win10里没有hosts文件

1,通过管理员进入命令行模式(window+R) 输入cmd

2,进入后输入以下命令。

3,for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P

4,然后摁回车键

5,再进入之后 就有hosts文件了 。

posted @ 2020-03-10 16:22  程序员阿飞  阅读(1900)  评论(0编辑  收藏  举报