在 Linux 下执行 nslookup 指令都会出现下列讯息:
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
告诉你使用 dig 或 host 指令来取代 nslookup,但可惜在 Windows 系统并没有 dig 与 host 指令。
以下是 dig、host 与 nslookup 的查询语法:
dig:
dig @NameServer 网域名称 Type
host:
host -t Type 网域名称 NameServer
nslookup:
nslookup -type=Type 网域名称 NameServer
其中 Type 的参数有
- any
- a: 查 IP Address
- mx: 查邮件服务器
- ns: 查名称服务器
- cname: 查别名
- ptr: 由 IP Address 反查网域名称
- hinfo: 查服务器的系统资讯
引用通告: Heartshare » nslookup, dig, host 指令的查询语法
很好的总结,比网上那些写的条理清晰的多,dig命令还是比较好用的。
DiG GUI - dig命令网页接口,挖掘DNS的秘密。
https://www.diggui.com/