hosts文件位置|hosts文件在哪|hosts文件内容

2025-10-20 08:50:24

1、Windows NT/2000/XP/Vista/win7(即微软NT系列操作系统):

 

默认位置为 %SystemRoot%\system32\drivers\etc\,但也可以改变。

 

典型的XP系统hosts文件位置:C:\windows\system32\drivers\etc

2、Windows 95/98/Me:%WinDir%\

3、Linux及其他类Unix操作系统:/etc

4、苹果系:

 

Mac OS 9及更早的系统:System Folder: Preferences或System folder(文件格式可能与Windows和Linux所对应的文件不同)

 

Mac OS X:/private/etc(使用BSD风格的hosts文件)

5、iPhone OS:/etc

6、iPad OS:/private/etc

7、Symbian第1/2版手机:C:\system\data\hosts

8、Symbian第3版手机:C:\private\10000882\hosts,只能使用兼容AllFiles的文件浏览器访问,大部分都不行。

1、  用记事本打开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

 

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