方法1

搜索“cmd”-以管理员身份运行,出现黑框,然后粘贴以下内容,按下Enter键就出现了hosts文件:

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

我用参考链接中的那个win+x - Windows PowerShell(管理员) 跳出的蓝色框不行,会报乱码错误:

用搜索-cmd-管理员运行就可以!host文件自己打开蹦出来了,再看etc文件夹下也有了。

参考:
https://www.zhihu.com/question/42286751/answer/327793073

方法2:这玩意儿对我没用

posted on 2024-04-17 16:01  西伯尔  阅读(38)  评论(0编辑  收藏  举报