win10里没有hosts文件

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

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

3,for /f %P in ('dir %windir%WinSxShosts /b /s') do copy %P %windir%System32driversetc & echo %P & Notepad %P

4,然后摁回车键

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

原文地址:https://www.cnblogs.com/feson/p/12456419.html