首页 > 电脑专区 > 电脑教程 >

如何修复损坏的host文件

来源:互联网 2023-02-21 18:37:49 188

host文件想必大家并不陌生,从属性上来说host文件是一个没有扩展名的系统文件,那么,该文件如果损坏,该怎么修复呢?i5W办公区 - 实用经验教程分享!

如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

工具/原料

  • 电脑一台

方法/步骤

  • 1

    从功能上来说,host文件是一个电脑内置的DNS的列表,优先级高于DNS,是IP地址和域名的对应,右键选择打开方式为文本文档,即可打开并编辑!i5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 1此文章未经许可获取自百度经验
  • 2

    而host文件的位置,其位于C盘的windows/system32/drivers/etc中,如图所示。i5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 3

    当然,按下windows R打开运行,输入c:windowssystem32driversetc按回车,如图所示。i5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 4

    接下来,我们选择找到的hosts文件后将其复制到桌面,用记事本打开。i5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 5

    然后,删除记事本的全部内容,将以下内容复制到文件中然后保存:i5W办公区 - 实用经验教程分享!

    # 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 hosti5W办公区 - 实用经验教程分享!

    # localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost# ::1 localhosti5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 6

    然后将修改好的hosts文件放到C盘windows/system32/drivers/etc中来替换以前的hosts文件,就可以完成修复了。i5W办公区 - 实用经验教程分享!

    如何修复损坏的host文件i5W办公区 - 实用经验教程分享!

  • 注意事项

    • 如有帮助,请投一票!

    以上方法由办公区教程网编辑摘抄自百度经验可供大家参考!i5W办公区 - 实用经验教程分享!


    标签: 操作系统修复损坏文件

    办公区 Copyright © 2016-2023 www.bgqu.net. Some Rights Reserved. 备案号:湘ICP备2020019561号统计代码