win7电脑hosts文件如何修复
来源:www.laobaicai.net 发布时间:2016-07-15 15:16
hosts文件是一个没有扩展名的系统文件,其主要作用是加快域名解析,让系统快速打开网页。当用户输入一个网址后,系统会从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文件,即可完成修复。

以上就是hosts文件修复方法,如果你也想更改hosts文件不妨参考以上步骤尝试着操作解决,希望可以帮助到大家。
下一篇:文件夹无法重命名解决方案
推荐阅读
"Win10累积更新卡在无限重启阶段的修复策略"
- win11系统无法识别移动硬盘怎么办 2024-05-06
- win11系统dns异常无法上网怎么办 2024-05-04
- win11系统如何调整鼠标速度 2024-05-03
- win11系统不显示wifi列表怎么办 2024-05-01
win10系统设置虚拟内存教程分享
- win11系统如何查看内存条卡槽数量 2024-04-29
- win11系统怎么开启节能模式 2024-04-29
- win11系统usb接口无法识别设备如何解决 2024-04-28
- win11系统如何添加网络打印机 2024-04-26
老白菜下载
更多-
老白菜怎样一键制作u盘启动盘
软件大小:358 MB
-
老白菜超级u盘启动制作工具UEFI版7.3下载
软件大小:490 MB
-
老白菜一键u盘装ghost XP系统详细图文教程
软件大小:358 MB
-
老白菜装机工具在线安装工具下载
软件大小:3.03 MB