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文件了 。

猜你喜欢

转载自www.cnblogs.com/feson/p/12456419.html