我们都知道hosts是一个没有扩展名的系统文件,我们很多功能会通过修改它来实现,然而近日有win10专业版系统用户在打开hosts文件的时候,却显示空白,这是怎么回事呢,可能是大家不小心删除了,为此,本文给大家带来win10电脑hosts文件是空的解决方法。
找到hosts文件,其中有两种方法:
一是通过路径查找:
c:\windows\system32\drivers\etc
二是通过运行(快捷键Win+R)输入“路径”查找。
进入文件夹以后,找到hosts文件,如果打开为空,则复制以下内容保存即可。(如果出现不能编辑的情况,先把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
上述便是win10 hosts文件空白的解决方法,遇到相同情况的小伙伴们可以尝试上面的方法来解决看看吧。
2021-03-20
2021-12-09
2021-06-21
2021-02-25
2021-07-11
2021-07-10
2022-09-15
2022-10-17
2021-10-13
2024-08-07
2024-08-07
2024-08-07
2024-08-07
2024-08-07
2024-08-07