windows系统用户包括Win10、win7、win8、windows XP
c:\windows\system32\drivers\etc
一个没有扩展名的系统文件,它的作用就是将一些常用的网址域名与之相对应的IP地址建立起的一个数据库。有了这个数据库之后,对于那些我们经常访问的网站就可以提高域名解析速度,提高速率。可以方便用户在很多单位的局域网中,分别给这些服务器起个名字,再在hosts中建立IP映射,以后访问的时候只需要输入服务器的名字即可。
点击开始菜单,选择附件,找到记事本,点击右键,选择“以管理员身份运行”
在文件名框中输入文件路径“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
修改全部名称为“hosts”,包括.txt。再放到c:\windows\system32\drivers\etc 目录下就可以了。
转载或引用请注明本文:https://www.qqdaohang.com/article/404/
文中内容仅做参考,不足之处请把建议告诉我们。