Skip to content

Commit

Permalink
Update nslookup.md (#451)
Browse files Browse the repository at this point in the history
* Update nslookup.md

添加了指定域名服务器的说明,以及相关的示例。

* Update README.md

添加了一个部署了linux command的网页。
ADD an address to the newly deployed Linux Command Website, which I maintain.
  • Loading branch information
IdiosyncraticDragon committed Nov 17, 2022
1 parent b3fb457 commit 9f8c761
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
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
```


0 comments on commit 9f8c761

Please sign in to comment.