系統知識網 系統知識 hosts文件的內容是什麼?如何清理hosts文件?

hosts文件的內容是什麼?如何清理hosts文件?

win7系統下hosts文件的內容是什麼?如何清理hosts文件?hosts文件的內容:# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file u。

win7系統下hosts文件的內容是什麼?如何清理hosts文件?

hosts文件的內容:

# 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

如何清理hosts文件?

 1、雙擊計算機圖標。
  2、輸入hosts文件的存儲地址,直接在文件地址欄輸入一下內容就好:C:\WINDOWS\system32\drivers\etc\hosts。

  3、按Enter鍵結束,彈出選擇文件打開方式的彈窗,選擇使用記事本打開。

  4、打開後顯示如下圖。前面一大段是說明性的文字,可以直接將整個文檔清空。

  5、標準的會有以下這些內容,如果多出來的話,應該是被修改瞭,可以根據自己的需要來對文件進行修改。

例如:現在有很多網站不經過用戶同意就將各種各樣的插件安裝到計算機中,有些說不定就是木馬或病毒。對於這些網站可以利用Hosts把該網站的域名映射到錯誤的IP或自己計算機的IP,這樣就不用訪問瞭。在Hosts寫上以下內容:
127.0.0.1 #屏蔽的網站
0.0.0.0 #屏蔽的網站
這樣計算機解析域名就解析到本機或錯誤的IP,達到瞭屏蔽的目的。

相關教程:
hosts是什麼文件?hosts文件位置在哪兒?

Win7系統下hosts文件失效無法修改怎麼辦?
總結:以上就是hosts文件的內容是什麼和清理hosts文件的方法瞭,希望對大傢有幫助

返回顶部