uTools-Manuals/docs/linux/nslookup.html
2019-04-21 11:50:48 +08:00

23 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="nslookup">nslookup</h1>
<p>查询域名DNS信息的工具</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>nslookup命令</strong> 是常用域名查询工具就是查DNS信息用的命令。</p>
<p>nslookup4有两种工作模式即“交互模式”和“非交互模式”。在“交互模式”下用户可以向域名服务器查询各类主机、域名的信息或者输出域名中的主机列表。而在“非交互模式”下用户可以针对一个主机或域名仅仅获取特定的名称或所需信息。</p>
<p>进入交互模式直接输入nslookup命令不加任何参数则直接进入交互模式此时nslookup会连接到默认的域名服务器<code>/etc/resolv.conf</code>的第一个dns地址。或者输入<code>nslookup -nameserver/ip</code>。进入非交互模式,就直接输入<code>nslookup 域名</code>就可以了。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">nslookup(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-sil不显示任何警告信息。</code></pre>
<h3 id="参数">参数</h3>
<p>域名:指定要查询域名。</p>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">[root@localhost ~]# nslookup www.jsdig.com
Server: 202.96.104.15
Address: 202.96.104.15#53
Non-authoritative answer:
www.jsdig.com canonical name = host.1.jsdig.com.
Name: host.1.jsdig.com
Address: 100.42.212.8</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->