恢复方法(hosts 删了直接新建即可) 1. 进入目录:C:\Windows\System32\drivers\etc\ Win+R 快速打开 etc 目录 1. 按下 Win + R,弹出【运行】窗口 2. 输入下面路径,直接复制粘贴进去: plaintext C:\Windows\System32\drivers\etc 3. 回车,直接打开 etc 文件夹 注意:这个文件夹里面默认看不到 hosts 的 txt 后缀,记得在文件夹顶部【查看】选项卡,勾选 文件扩展名,才能正常修改文件名。 小补充 如果想直接用记事本打开 hosts(需要管理员) Win+R 输入: plaintext notepad C:\Windows\System32\drivers\etc\hosts 2. 在 etc 文件夹内,新建文本文档,重命名为 hosts(删掉 .txt 后缀) 注意:修改 hosts 必须用管理员权限打开记事本,否则无法保存。 Windows 原版干净 hosts(空白模板,你可以备份) 文件名称:hosts 下方是文件内容: # Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost