电脑hosts文件如何修复_修复hosts文件的方法

发布时间:2024-02-14 点击:118
windows系统中都有hosts文件,它是一个没有扩展名的系统文件,hosts文件有着可以屏蔽网站,重新定向网站域名等作用,那该文件损坏了要怎么修复呢?下面小编就来教大家修复hosts文件的方法。
具体方法如下:
1、将hosts文件复制到桌面,用记事本打开
2、删除记事本的全部内容,将以下内容复制后放入文件然后保存:
# 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
3、将修改后的hosts文件放入c:\\windows\\system32\\drivers\\etc替换以前的hosts文件,修复成功!
上面就是关于电脑hosts文件如何修复的方法啦。有同样情况的网友可以按照上面的步骤来操作哦。
相关教程:离线修复windows受损文件修复文件系统电脑怎么改hosts


如何抢注cc域名?cc域名有哪些特点?
建设公司网站哪家好?网站建设价格影响因素有哪些?
阿里云服务器备案域名
怎样判断手机网站制作哪家好?手机网站设计的原则是什么?
爆款云服务器ecs云服务器
什么是.dog域名?怎么注册dog域名?
域名.vip都有哪些优势特点?
域名申请注意事项有哪些 应该选择什么样的域名