Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Windows 7系統教程 >> Win7系統應用技巧 >> Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

日期:2017/1/24 19:12:09      編輯:Win7系統應用技巧

  Hosts文件是一個沒有擴展名的系統文件,主要是能夠加快域名解析和屏蔽網站等功能。Hosts文件是個好東西,可以幫助我們有效的屏蔽各種各樣的惡意網站,從保護了我們的電腦。我們還可以對其添加或者修改,不過還有很多在使用Win7系統的用戶來說,Hosts存放在的哪個地方還不知道?下面就和大家詳細說一下Win7系統hosts文件在哪裡,怎麼修復hosts文件。

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  具體步驟如下:

  一、Hosts文件是什麼

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

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  二、Hosts文件位置在哪裡

  1、Windows xp/2003/vista/2008/7/8用戶Hosts文件是在“c:\windows\system32\drivers\etc

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  2、你可以直接根據上述路徑進入,也可Win+R後輸入c:\windows\system32\drivers\etc

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  三、Hosts文件怎麼修復

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

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

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

  # 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

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  3、將修改後的Hosts文件放入c:\windows\system32\drivers\etc替換以前的Hosts文件,修復成功!

Win7系統Hosts文件在哪裡?怎麼修復Hosts文件

  以上就是關於Win7系統hosts文件在哪裡,怎麼修復hosts文件的全部內容了。有需要的用戶可以根據上面的方法就能夠找到hosts文件的存放位置了。不妨去試一下就知道了。

Copyright © Windows教程網 All Rights Reserved