# 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檔案是吧
路徑在
C:\Windows\System32\drivers\etc
建議先修改許可權,否則無法更改
建議像我這樣設定user許可權
以上設定只是用於個人電腦,伺服器設定後有安全隱患,慎重
ヽ(*゚ー゚*)ノ我是一個愛折騰的up主,純愛好,愛折騰,擅長軟體安全,網路安全,資料安全,WEB伺服器安全,等技術,關注我,學習更多網路知識
Windows 10 64位的預設檔案一般在C:\Windows\System32\drivers\etc目錄下。
有些系統在此目錄下是沒有hosts檔案的,如果沒此檔案,可以在其他目錄新建一個hosts檔案,然後複製到C:\Windows\System32\drivers\etc目錄。
正常情況下不建議修改此檔案,如果需要修改,建議先備份,然後把hosts檔案複製到其他非系統目錄(如桌面),修改後再複製C:\Windows\System32\drivers\etc目錄並替換hosts檔案。
注意:千萬不要在C:\Windows\System32\drivers\etc目錄直接修改hosts檔案,這樣是無法儲存的。
下面是Windows 10 64位的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
版本資訊
位置:
C:\Windows\System32\drivers\etc
內容:
# 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:
# localhost name resolution is handled within DNS itself。
# 127。0。0。1 localhost
# ::1 localhost
預設是空的 沒有東西
這是預設安裝位置,如果你更改了win安裝目錄,請相應更換
預設內容是一大段英文,但都是註釋掉的備註,相當於是一個空檔案