windows hosts文件配置
有勇气的牛排
464
Windows
2023-02-19 20:08:19
win11可能会丢失此文件,源文件内容放到这里了,需要的可以复制粘贴。
路径:C:\Windows\System32\drivers\etc
# 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
192.168.56.20 master
192.168.56.21 slave1
192.168.56.22 slave2
<p>win11可能会丢失此文件,源文件内容放到这里了,需要的可以复制粘贴。</p>
<p>路径:<code>C:\Windows\System32\drivers\etc</code></p>
<pre><div class="hljs"><code class="lang-c"># Copyright (c) <span class="hljs-number">1993</span><span class="hljs-number">-2009</span> Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP <span class="hljs-keyword">for</span> Windows.
#
# This file contains the mappings of IP addresses to host names. Each
<span class="hljs-meta"># entry should be kept on an individual <span class="hljs-keyword">line</span>. The IP address should</span>
<span class="hljs-meta"># be placed in the first column followed by the corresponding host name.</span>
# The IP address and the host name should be separated by at least one
<span class="hljs-meta"># space.</span>
#
# Additionally, comments (such as these) may be inserted on individual
<span class="hljs-meta"># lines or following the machine name denoted by a <span class="hljs-string">'#'</span> symbol.</span>
#
# For example:
#
# <span class="hljs-number">102.54</span><span class="hljs-number">.94</span><span class="hljs-number">.97</span> rhino.acme.com <span class="hljs-meta"># source server</span>
# <span class="hljs-number">38.25</span><span class="hljs-number">.63</span><span class="hljs-number">.10</span> x.acme.com <span class="hljs-meta"># x client host</span>
<span class="hljs-meta"># localhost name resolution is handled within DNS itself.</span>
# <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span> localhost
# ::<span class="hljs-number">1</span> localhost
<span class="hljs-number">192.168</span><span class="hljs-number">.56</span><span class="hljs-number">.20</span> master
<span class="hljs-number">192.168</span><span class="hljs-number">.56</span><span class="hljs-number">.21</span> slave1
<span class="hljs-number">192.168</span><span class="hljs-number">.56</span><span class="hljs-number">.22</span> slave2
</code></div></pre>
留言