时间:2021-10-21 15:21
怎么修复hosts文件?不会的小伙伴快来学习了。
怎么修复hosts文件
1、打开进入【我的电脑】,双击进入C盘。
2、从上方的路径【C盘>Windows>System32>drivers>etc】找到【hosts】。
3、选中后,鼠标右击,选择【用记事本打开该文件】。
4、删除记事本的全部内容,将以下内容复制后放入文件然后保存:
# copyright (c) 1993-1999 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
127.0.0.1 localhost
127.0.0.1 localhost
5、将修改后的hosts文件放入C:\Windows\System32\drivers\etc替换以前的hosts文件即可。