当前位置:首页 > 系统教程 > Win7教程 > 详细页面

win7怎么修复hosts文件

时间:2018-05-10来源:老毛桃一键重装作者:佚名

在win7系统中,hosts文件可以加快域名解析,快速打开网页,不过当hosts文件损坏或是被恶意篡改时,应该怎么办呢?下面就让小编为大家带来win7修复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文件的办法。如果想要对hosts进行修复,可以根据上述步骤进行操作。

分享到:

相关信息

  • win7提示sgtool.exe应用程序错误的解决方法

    相信有很多电脑用户都对搜狗输入法不陌生了,有很多用户都会使用这款输入法,但是最近有位win7系统用户使用电脑的时候,碰到了sgtool.应用程序错误的问题,用户不知道如何解决,为此非常苦恼,那么win7提示sgtool.exe应用...

    2019-12-29

  • win7怎么查看电脑主机配置

    我们都清楚每一款游戏或者软件都有其硬盘最低要,就连系统本身也不例外,如果用户使用的系统是win7系统,就可以和其他系统一样,使用系统自带功能查看硬件的配置,那么win7如何查看电脑主机配置呢?下面为大家带来win7电脑查...

    2019-12-29