如何重置hosts

发布网友 发布时间:2022-04-22 04:50

我来回答

2个回答

热心网友 时间:2022-05-31 00:54

hosts文件的所在路径:

在nt、2000、xp、2003、vista和win 7的32位版本中,它存在于"%windir%\System32\drivers\etc\",

而位版本则在"%windir%\SysWOW\drivers\etc\"路径下。
如何把hosts文件恢复到默认状态:

1、你可以把引号之间的文字复制到资源管理器中,然后就可以快速找到这个文件了。
2、使用记事本打开这个文件。(在这之前你可以复制一下这个文件,作为备份)
3、清空其中的所有内容,然后把以下的内容复制进去(注意系统版本),最后保存。如果要其生效,那么之前打开的浏览器需要重启。

windows 7的默认hosts文件内容:

# Copyright (c) 1993-2006 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 indivial 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 indivial
# 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 handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

windows vista和2008 server的默认hosts文件内容:

# Copyright (c) 1993-2006 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 indivial 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 indivial
# 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
::1 localhost

windows xp和2003 server的默认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 indivial 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 indivial
# 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

或者使用微软的修复工具把它恢复到默认状态。

热心网友 时间:2022-05-31 00:54

C:\Windows\System32\drivers\etc

这个路径

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com