admin 管理员组文章数量: 1184232
2024年4月13日发(作者:数据结构教程易法令)
Hosts文件是一个用于存储计算机网络中节点信息的文件,它可以将主机名映射到相
应的IP地址,实现DNS的功能,它可以由计算机的用户进行控制。
一、Hosts文件基本介绍
Hosts文件的存储位置在不同的操作系统中并不相同,甚至不同Windows版本的位
置也不大一样:
Windows NT/2000/XP/2003/Vista/win7:默认位置
为%SystemRoot%system32driversetc,但也可以改变。
例如 c:windowssystem32driversetc
动态目录由注册表键HKEY_LOCAL_MACHINESYSTEMCurrentControlSet
ServicesTcpipParametersDataBasePath决定。
Windows 95/98/Me:%WinDir%
用记事本打开hosts文件,就可以看见了微软对这个文件的说明。Hosts文件文一般
有如下面的基本内容
# Copyright (c) 1993-1999 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 # source server
版权声明:本文标题:Host文件 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1713011945a617108.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论