您的位置: 首页好东西IT知识 → HOSTS是什么|HOSTS文件位置|HOSTS文件内容

HOSTS是什么|HOSTS文件位置|HOSTS文件内容

我要评论 2012/03/24 00:00:00来源:互联网 编辑:当易小编 [ ] 评论:0 点击:952次

HOSTS是什么|HOSTS文件位置|HOSTS文件内容

    HOSTS是一个ASCII码格式的域名解文件,存储在:C:\WINDOWS\system32\drivers\etc文件夹下。它里面可以存储域名到IP地址的映射记录。在以前没有DNS服务器进行域名解析的时候就用HOSTS文件来存储解析记录,现在也用它存储一些常用的DNS解析记录。当然它也有可能被一些恶意网站篡改,当然打开某些网址的时候确打开了另一个网站,就是这种情况。

    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     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

如果您的HOSTS自己没有配置过,而与这里的内容不同,有可能被别的程序或病毒、木马修改过,建议将不同的地方删除,以免您正常使用电脑。

关键词:HOSTS