电脑内没有hosts文件怎么办

2025-10-27 10:09:15

1、方法1:我们进入C:\Windows\System32\drivers\etc文件夹,然后新建一个记事本。

电脑内没有hosts文件怎么办

电脑内没有hosts文件怎么办

2、然后我们在记事本内输入以下内容:

# 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

#127.0.0.1 gilisoft.com

然后保存。

电脑内没有hosts文件怎么办

3、我们保存后,将记事本 新建 文本文档.txt名字改为hosts,记住不要带后辍格式就叫hosts,然后系统会提示你是否确认更改格式,我们点击是就可以了。

电脑内没有hosts文件怎么办

电脑内没有hosts文件怎么办

4、方法2:我们按下WIN+R呼出运行菜单,然后在运行菜单中输入:attrib %SystemRoot%\system32\drivers\etc\hosts -h -r -s    

电脑内没有hosts文件怎么办

5、然后我们继续在运行菜单中输入:notepad %SystemRoot%\system32\drivers\etc\hosts 这样就可以打开hosts文件了。

电脑内没有hosts文件怎么办

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢