Hosts文件主要作用是定義IP地址和主機名的映射關系,是一個映射IP地址和主機名的規定。
用戶HOSTS文件是在“c:\windows\system32\drivers\etc
Win+R后輸入c:\windows\system32\drivers\etc
將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文件放入c:\windows\system32\drivers\etc替換以前的hosts文件,修復成功!
Windows10系統修改hosts:
1.打開“運行”對話框
2.鍵入hosts文件路徑:C:\WINDOWS\system32\drivers\etc 完成后,
3.點擊下方的“確定”打開,
在hosts文件上點擊鼠標右鍵,打開“屬性”
“安全”選項卡,更改的當前用戶名,然后點擊下方的“編輯”在彈出的編輯權限操作界面,先點擊選中需要更高權限的賬戶名稱,
直接點擊“是”即可
在hosts文件上點擊鼠標右鍵,點擊“打開方式”
0 篇文章
如果覺得我的文章對您有用,請隨意打賞。你的支持將鼓勵我繼續創作!