您的位置:首頁技術文章
文章詳情頁

Win7系統Hosts文件在哪里?怎么修復Hosts文件

瀏覽:3日期:2022-11-06 14:06:46

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:windowssystem32driversetc

Win7系統Hosts文件在哪里?怎么修復Hosts文件

2、你可以直接根據上述路徑進入,也可Win+R后輸入c:windowssystem32driversetc

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:windowssystem32driversetc替換以前的Hosts文件,修復成功!

Win7系統Hosts文件在哪里?怎么修復Hosts文件

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

標簽: Windows系統 win7
相關文章:
国产综合久久一区二区三区