當前位置:才華齋>計算機>計算機應用>

win7 hosts檔案修復方法

計算機應用 閱讀(1.2W)

hosts檔案是一個沒有副檔名的系統檔案,其主要作用是加快域名解析,讓系統快速開啟網頁。當用戶輸入一個網址後,系統會從hosts檔案中尋找對應的'IP地址,然後瀏覽器才能開啟網頁。如果碰到hosts檔案損壞了或者被惡意篡改了要怎麼辦呢?下面就一起來看看hosts檔案修復方法。

win7 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:## # source server# # x client host

# localhost name resolution is handled within DNS itself.# localhost# ::1 localhost

5、然後將修改後的hosts檔案放到c:windowssystem32driversetc來替換以前的hosts檔案,即可完成修復。

以上就是hosts檔案修復方法,如果你也想更改hosts檔案不妨參考以上步驟嘗試著操作解決,希望可以幫助到大家。