Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nslookup.md #451

Merged
merged 2 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

**其它 web 版本**

[`linux.ftqq.com`](https://linux.ftqq.com/),[`linux.gaomeluo.com`](https://linux.gaomeluo.com),[`atoolbox.net`](http://www.atoolbox.net/Tool.php?Id=826),[`xiaoshanseo.com`](https://tools.xiaoshanseo.com/Tools/linux-command/),[`262235.xyz`](https://262235.xyz/linux-command/),[`cmsblogs.cn`](https://linux.cmsblogs.cn/),[`loquy.cn`](https://www.loquy.cn/linux-command/),[`buyao.vip`](https://demo.buyao.vip/linux/),[`hezhiqiang.gitbook.io`](https://hezhiqiang.gitbook.io/linux/)
[`linux.ftqq.com`](https://linux.ftqq.com/),[`linux.gaomeluo.com`](https://linux.gaomeluo.com),[`atoolbox.net`](http://www.atoolbox.net/Tool.php?Id=826),[`xiaoshanseo.com`](https://tools.xiaoshanseo.com/Tools/linux-command/),[`262235.xyz`](https://262235.xyz/linux-command/),[`cmsblogs.cn`](https://linux.cmsblogs.cn/),[`loquy.cn`](https://www.loquy.cn/linux-command/),[`buyao.vip`](https://demo.buyao.vip/linux/),[`hezhiqiang.gitbook.io`](https://hezhiqiang.gitbook.io/linux/),[`linux.liguiying.cn`](https://linux.liguiying.cn/)

## 微信小程序版本

Expand Down
18 changes: 16 additions & 2 deletions command/nslookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ nslookup

**nslookup命令** 是常用域名查询工具,就是查DNS信息用的命令。

nslookup4有两种工作模式,即“交互模式”和“非交互模式”。在“交互模式”下,用户可以向域名服务器查询各类主机、域名的信息,或者输出域名中的主机列表。而在“非交互模式”下,用户可以针对一个主机或域名仅仅获取特定的名称或所需信息。
nslookup有两种工作模式,即“交互模式”和“非交互模式”。在“交互模式”下,用户可以向域名服务器查询各类主机、域名的信息,或者输出域名中的主机列表。

在“非交互模式”下,用户可以针对一个主机或域名仅仅获取特定的名称或所需信息,此时也可以指定查询的DNS服务器。

进入交互模式,直接输入nslookup命令,不加任何参数,则直接进入交互模式,此时nslookup会连接到默认的域名服务器(即`/etc/resolv.conf`的第一个dns地址)。或者输入`nslookup -nameserver/ip`。进入非交互模式,就直接输入`nslookup 域名`就可以了。

### 语法

```shell
nslookup(选项)(参数)
nslookup(选项)(参数)(DNS服务器)
```

### 选项
Expand All @@ -27,6 +29,9 @@ nslookup(选项)(参数)

域名:指定要查询域名。

### DNS服务器
不填的话采用默认域名服务器(即`/etc/resolv.conf`的第一个dns地址),填写DNS服务器IP的话,nslookup会向该域名服务器查询域名。

### 实例

```shell
Expand All @@ -38,6 +43,15 @@ Non-authoritative answer:
www.jsdig.com canonical name = host.1.jsdig.com.
Name: host.1.jsdig.com
Address: 100.42.212.8

[root@localhost ~]# nslookup www.sustech.edu.cn 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
www.sustech.edu.cn canonical name = www.sustech.edu.cn.w.cdngslb.com.
Name: www.sustech.edu.cn.w.cdngslb.com
Address: 113.96.179.222
```