㈠ 鎬庝箞娓呯悊鐢佃剳閲岄潰鐨刪osts鏂囦欢
host鏂囦欢涓鑸鏃犻渶娓呯悊锛屽傞渶娓呯悊鍙鎸変笅闈㈢殑鏂规硶鎿嶄綔锛
1銆侀栧厛鍦ㄦ垜鐨勭數鑴戠殑鍦板潃鏍忎腑杈撳叆c:windowssystem32driversetc锛岀劧鍚庡湪鎵撳紑鐨勬枃浠跺す涓鎵惧埌hosts
㈡ 鐢佃剳hosts鏂囦欢涓㈠け鎬庝箞鍔
濡傛灉hosts鏂囦欢娌℃湁浜嗭紝鍙浠ラ氳繃澶氱嶆柟娉曡繘琛屾仮澶嶃傛渶鐩存帴鐨勬柟娉曟槸浠庡囦唤涓鎭㈠嶏紝鎴栬呬娇鐢ㄧ郴缁熻嚜甯︾殑宸ュ叿鏉ラ噸缃甴osts鏂囦欢銆傚傛灉娌℃湁澶囦唤锛屼篃鍙浠ユ墜鍔ㄥ垱寤轰竴涓鏂扮殑hosts鏂囦欢銆
1. 浠庡囦唤涓鎭㈠峢osts鏂囦欢
濡傛灉浣犳湁瀹氭湡澶囦唤浣犵殑绯荤粺鎴栭噸瑕佹枃浠讹紝閭d箞浠庡囦唤涓鎭㈠峢osts鏂囦欢鏄鏈鐩存帴鍜屾湁鏁堢殑鏂规硶銆傛壘鍒板囦唤鐨刪osts鏂囦欢锛堥氬父浣嶄簬C:\Windows\System32\drivers\etc\hosts锛夛紝鐒跺悗澶嶅埗绮樿创鍒板師浣嶇疆鍗冲彲銆傞渶瑕佹敞鎰忕殑鏄锛岃嗙洊鐜版湁鏂囦欢涔嬪墠鏈濂界‘璁や竴涓嬪囦唤鏂囦欢鐨勬棩鏈熷拰鍐呭癸紝浠ョ‘淇濆畠鏄浣犳兂瑕佺殑鐗堟湰銆
2. 浣跨敤绯荤粺宸ュ叿閲嶇疆hosts鏂囦欢
Windows绯荤粺鎻愪緵浜嗕竴浜涘唴缃宸ュ叿鏉ラ噸缃鎴栦慨澶嶇郴缁熸枃浠讹紝鍖呮嫭hosts鏂囦欢銆備綘鍙浠ヤ娇鐢ㄢ滅郴缁熸枃浠舵鏌ュ櫒鈥濓紙sfc /scannow锛夋潵鎵鎻忓拰淇澶嶇郴缁熸枃浠躲傛墦寮鍛戒护鎻愮ず绗︼紙浠ョ$悊鍛樿韩浠借繍琛岋級锛岃緭鍏モ渟fc /scannow鈥濆苟鍥炶溅銆傝繖涓杩囩▼鍙鑳介渶瑕佷竴浜涙椂闂达紝瀹屾垚鍚庨噸鍚璁$畻鏈猴紝妫鏌hosts鏂囦欢鏄鍚﹀凡鎭㈠嶃
3. 鎵嬪姩鍒涘缓hosts鏂囦欢
濡傛灉娌℃湁澶囦唤锛屼篃鏃犳硶閫氳繃绯荤粺宸ュ叿鎭㈠嶏紝浣犲彲浠ユ墜鍔ㄥ垱寤轰竴涓鏂扮殑hosts鏂囦欢銆傚湪鏂囨湰缂栬緫鍣ㄤ腑鎵撳紑涓涓鏂版枃浠讹紝杈撳叆浠ヤ笅鍐呭癸細
# Copyright (c) 1993-2023 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 indivial 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 indivial
# 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
杩欐槸涓涓鍩烘湰鐨刪osts鏂囦欢鏍煎紡锛屼綘鍙浠ユ牴鎹闇瑕佹坊鍔犳垨淇鏀规潯鐩銆備繚瀛樻枃浠朵负鈥渉osts鈥濓紙鏃犳墿灞曞悕锛夛紝鐒跺悗灏嗗叾绉诲姩鍒癈:\Windows\System32\drivers\etc\鐩褰曚笅銆傞渶瑕佹敞鎰忕殑鏄锛屾浛鎹㈢幇鏈夋枃浠朵箣鍓嶆渶濂藉厛鍋氫竴涓澶囦唤锛屼互闃蹭竾涓銆
4. 棰勯槻鎺鏂
涓轰簡閬垮厤鏈鏉ュ啀娆′涪澶県osts鏂囦欢锛屽缓璁閲囧彇涓浜涢勯槻鎺鏂姐傞栧厛锛屽畾鏈熷囦唤浣犵殑绯荤粺鍜岄噸瑕佹枃浠讹紝鍖呮嫭hosts鏂囦欢銆傚叾娆★紝閬垮厤浣跨敤涓嶆槑鏉ユ簮鐨勮蒋浠舵垨宸ュ叿鏉ヤ慨鏀筯osts鏂囦欢锛屽洜涓鸿繖鍙鑳藉艰嚧鏂囦欢鎹熷潖鎴栦涪澶便傛渶鍚庯紝淇濇寔浣犵殑鎿嶄綔绯荤粺鍜岄槻鐥呮瘨杞浠舵洿鏂板埌鏈鏂扮増鏈锛屼互闃茶寖娼滃湪鐨勫畨鍏ㄩ庨櫓銆
㈢ 濡備綍淇澶峢ost鏂囦欢
鏂规硶涓锛氫娇鐢ㄧ數鑴戝畨鍏ㄨ蒋浠朵慨澶
1銆佺幇鍦ㄧ殑鐢佃剳瀹夊叏杞浠跺姛鑳藉崄鍒嗕赴瀵岋紝渚嬪傜伀缁掑畨鍏ㄨ蒋浠躲360瀹夊叏杞浠剁瓑閮芥湁淇澶峢osts鏂囦欢鐨勫姛鑳
2銆佸崄鍒嗛傚悎涓嶅お鍠滄㈡姌鑵剧數鑴戠殑灏忕櫧鐢ㄦ埛浣跨敤锛屼笉杩囧畨鍏ㄨ蒋浠朵篃姣旇緝鍚冨唴瀛
3銆佸苟涓旀湁浜涘畨鍏ㄨ蒋浠舵瘮杈“娴佹皳”锛屽畨瑁呭悗鏃犳硶鍗歌浇骞插噣銆
鏂规硶浜岋細鐩存帴鎵惧埌hosts鏂囦欢锛屽垹闄ゆ帀hosts鏂囦欢鍐呯殑鏁版嵁
1銆乭osts鏂囦欢璺寰勶細C:WindowsSystem32driversetc 鎸夌収杩欎釜璺寰勶紝鎵惧埌hosts鏂囦欢锛岀敤璁颁簨鏈绋嬪簭鎵撳紑銆
2銆佺劧鍚庡垹鎺夐噷闈㈡棤鍏崇殑鍩熷悕鎴栬匢P锛堜笉鎳傜殑鐢ㄦ埛鍒犳帀鍏ㄩ儴鏁版嵁锛夛紝鐒跺悗淇濆瓨鍗冲彲銆
鏂规硶涓夛細閲嶈呯郴缁
1銆佸傛灉涓婇潰鐨勬柟娉曢兘涓嶅忔晥鐨勮瘽寰堝彲鑳芥槸浣犵殑绯荤粺瀛樺湪浜嗘晠闅滄垨鑰呭嚭鐜颁簡鏂囦欢璇鍒犵殑鎯呭喌
2銆佸缓璁浣犵洿鎺ラ噸鏂板畨瑁呯郴缁燂紝鍙瑕佷竴閿灏辫嚜鍔ㄥ畨瑁呭畬鎴愰熷害椋炲揩锛屽嚑鍒嗛挓灏辫兘澶熷紑濮嬩娇鐢