多语言展示
当前在线:1768今日阅读:126今日分享:42

怎样将主机文件重置回默认值

Hosts(主机文件)是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,系统会立即打开对应网页,如果没有找到,则系统再会将网址提交DNS域名解析服务器进行IP地址的解析。
步骤/方法
1

单击“开始”菜单,单击“运行”命令,在“打开”框中键入“%systemroot%\system32\drivers\etc”,单击“确定”按钮

2

打开的文件夹窗口鼠标右击“hosts”文件,在弹出的快捷菜单单击“删除”命令

3

然后在etc文件夹窗口的空白处鼠标右键单击“新建”——“文本文档”

4

鼠标右击“新建 文本文档.txt”,弹出的菜单单击“重命名”命令,将其连同扩展名命名为“Hosts”,按回车键

5

弹出“确实要更改吗”的对话框,单击“是”

6

双击打开Hosts文件,在打开方式的程序框中选择“记事本”,单击“确定”按钮

7

将下面的内容拷贝到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

8

最后保存并关闭Hosts文件

推荐信息