Ubuntu中使用dig命令的示例:
打开终端命令行模式。
使用dig命令来查询单个主机的信息。
yisu@yisu:~$ dig www.yisu.com
; <<>> DiG 9.11.3-1Ubuntu1.5-Ubuntu <<>> www.yisu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17774
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.yisu.com. IN A
;; ANSWER SECTION:
www.yisu.com. 5 IN A 122.228.238.15
www.yisu.com. 5 IN A 106.42.25.203
;; Query time: 10 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Mar 03 10:55:35 CST 2019
;; MSG SIZE rcvd: 77