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文件了 。
win10里没有hosts文件
原文:https://www.cnblogs.com/feson/p/12456419.html