
hosts文件是一个没有扩展名的'系统文件,其主要作用是加快域名解析,让系统快速打开网页。当用户输入一个网址后,系统会从hosts文件中寻找对应的IP地址,然后浏览器才能打开网页。如果碰到hosts文件损坏了或者被恶意篡改了要怎么办呢?下面就一起来看看hosts文件修复方法。
1、首先我们需要找到hosts文件在哪里,其位于c:windowssystem32driversetc项中。
2、你可以直接按组合键win+r打开运行,输入c:windowssystem32driversetc按回车,就可以找到了。
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 ed 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:windowssystem32driversetc来替换以前的hosts文件,即可完成修复。
以上就是hosts文件修复方法,如果你也想更改hosts文件不妨参考以上步骤尝试着 *** 作解决,希望可以帮助到大家。
工具/原料Win10
Win10修改编辑hosts文件无法保存怎么办
首先进入Win10系统的hosts文件所在位置,我们直接输入C:\Windows\System32\Drivers\etc后回车就可以打开了,右键hosts文件,选择属性
点击hosts属性对话框里的“高级”
在hosts的高级安全设置界面点击更改权限
在新d出的对话框里点击添加按钮
点击hosts的权限项目窗口下面的主体的“选择主体”
点击进入选择用户或组界面,点击高级
点击高级后,我们接着在点击理解查找,然后在查找结果里找到当前用户的账号,选中后点击确定
在选择用户或组界面里点击确定
将hosts的权限项目界面下的基本权限的所以项目都勾选上,然后点击确定
权限添加成功后,直接点击确定
点击后,系统提示你将要更改系统文件夹的权限设置,这样会降低计算机的安全性,并导致用户访问文件时出现问题。要继续吗?我们点击是。
*** 作方法如下:
1、首先打开C:\windows\system32\drivers\etc文件夹,删除其中的hosts文件;
2、点击开始,点击所有程序,点击附件,点击记事本;
3、复制以下内容到记事本中;
# 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
4、点击文件菜单保存命令,存储路径选择C:\windows\system32\drivers\etc,文件名输入hosts,保存类型选择所有文件,点击保存即可。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)