Ubuntu中使用dig命令的示例:
1.打開終端命令行模式。
2.使用dig命令來查詢單個主機的信息。
yisu@yisu:~$ dig www.neiyidaogou.com
; <<>> DiG 9.11.3-1Ubuntu1.5-Ubuntu <<>> www.neiyidaogou.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.neiyidaogou.com. IN A
;; ANSWER SECTION:
www.neiyidaogou.com. 5 IN A 122.228.238.15
www.neiyidaogou.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