Hosts文件異常及修復


Hosts文件是什么?

  :Hosts文件主要作用是定義IP地址和主機名的映射關系,是一個映射IP地址和主機名的規定。可以用文本文件打開!當用戶在瀏覽器中輸入一個需要登錄的網址時,系統會首先自動從Hosts文件中尋找對應的IP地址,一旦找到,瀏覽器會立即打開對應網頁,如果沒有找到,則瀏覽器會將網址提交DNS服務器進行IP地址解析。這也是提高快速打開網頁的方法!

 Hosts文件位置在哪里?

  1、Windows XP/2003/Vista/2008/7/8/8.1/10用戶Hosts文件是在:C:\Windows\System32\drivers\etc

       2、也可Win+R后輸入:C:\Windows\System32\drivers\etc

Hosts文件修復:

       1、將hosts文件復制到桌面,用記事本打開;

       2、刪除記事本的全部內容,將以下內容復制后放入文件然后保存:

  # 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

  127.0.0.1 localhost

3、將修改后的hosts文件放入C:\Windows\System32\drivers\etc替換以前的hosts文件,修復成功!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM