win7 hosts文件损坏被恶意篡改怎么办 win7系统 hosts文件修复方法

Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,系统会立即打开对应网页,如果没有找到,则系统再会将网址提交DNS域名解析服务器进行IP地址的解析。当用户输入一个网址后,系统会从hosts文件中寻找对应的IP地址,然后浏览器才能打开网页。如果碰到hosts文件损坏了或者被恶意篡改了要怎么办呢?下面就一起来看看hosts文件修复方法。

1、首先我们需要找到hosts文件在哪里,其位于c:\windows\system32\drivers\etc项中。

2、你可以直接按组合键win+r打开运行,输入c:\windows\system32\drivers\etc按回车,就可以找到了。

3、找到hosts文件后将其复制到桌面,用记事本打开。

4、删除记事本的全部内容,将以下内容复制到文件中然后保存:


# 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

5、然后将修改后的hosts文件放到c:\windows\system32\drivers\etc来替换以前的hosts文件,即可完成修复。

以上所述是小编给大家介绍的win7系统 hosts文件修复方法 ,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对我们网站的支持!

(0)

相关推荐