计算机管理系统:电脑网络技术记录本

windows

当前位置:首页 > 电脑技术 > windows

Windows 10系统中找不到hosts文件

hosts找不到只有两种可能:


1.被隐藏了;


2.不存在。


如果是第一种的话,打开C:\Windows\System32\drivers\etc,点击查看

Windows 10系统中找不到hosts文件

如果是第二种的话:


在此目录下:C:\Windows\System32\drivers\etc 新建一个hosts.txt文件,然后将一下内容粘贴进去。


# 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

修改文件hosts.txt 为: hosts 即可。


也可以Windows + R, 输入cmd,出现命令行窗口输入(复制)以下内容:


for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P


敲进去,或者复制粘贴啦,按下Enter键就出现了hosts文件。

文章评论

表情

共 0 条评论,查看全部
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~