如果只是想查某个域名的所有 IP,命令 `dig` 就可以了(假如系统没自带的话,一般是要装 dnsutils 这个软件包;Windows 的话就不清楚了)。
比如(@8.8.8.8 是从指定的服务器查询,不写的话就是从当前系统设定的服务器那里查):
$ dig @
8.8.8.8
google.com ; <<>> DiG 9.9.3-P1 <<>> @
8.8.8.8
google.com ; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1193
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;
google.com. IN A
;; ANSWER SECTION:
google.com. 266 IN A 74.125.31.139
google.com. 266 IN A 74.125.31.101
google.com. 266 IN A 74.125.31.138
google.com. 266 IN A 74.125.31.100
google.com. 266 IN A 74.125.31.113
google.com. 266 IN A 74.125.31.102
;; Query time: 248 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Jul 09 00:12:19 CST 2013
;; MSG SIZE rcvd: 135