Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建亏察蔽立一个关联“数据库”,还是比较重要的一个文件。
当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,系统会立即打开对应网页,可以简化上网流程销州。
扩展资料:
Hosts文件位置
windows 用户HOSTS文件是在“c:\windows\system32\drivers\etc,这个文件一定是在系统盘,如果你的没谨系统在D盘请自行修改前面的盘符。
下面代码粘贴到记事本保存为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
1、系统默认的用户HOSTS文件是在“c:\windows\system32\drivers\etc,默认文件是在系统盘。
2、输入Win+R组合键,d出运行栏d窗,如图所示闷岩。
3、然后在运行文本框输入c:\windows\system32\drivers\etc命令,点击确定按钮,如图所示。
4、然后进入到默认系统hosts文件夹下,将其复制,然洞盯后用记事本纳罩和打开。
5、 然后用恢复Hosts文件的代码进行替换,打开记事本的内容。
6、修改之后,然后进入到c:\windows\system32\drivers\etc文件,替换以前的hosts文件。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)