1、以管理员身份运行cmd命令提示符
2、在命令行中输入:notepad %windir%\system32\drivers\etc\hosts
notepad %windir%\system32\drivers\etc\hosts
3、hosts文件就打开了,修改完直接ctrl+s保存即可。