我添加了太多 hosts 文件条目,导致现在我的整个计算机都出现滞后和冻结,我的 Chrome 无法加载任何网站,并且我的计算机说我的 Wi-Fi 没有互联网,尽管连接到它的其他设备工作正常。
我尝试按照以下步骤删除该文件这,但它说该文件正在被 DNS 客户端使用,目前无法更改。我也尝试禁用 DNS 客户端,但 Windows 完全拒绝了这种情况的发生。
我可以在记事本中更改它,但无法保存,因为它说 DNS 客户端正在使用它。我该如何解决这个问题?(我使用的是 Windows 10。)
答案1
启动到安全模式,删除现有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