- Linux
- Linux command
- here
dig Command - Find the IP Address from the Domain Name. DNS Server Information Inquiry.
You can use the dig command to query DNS server information. Most often, you want to get IP address information from a domain name.
dig DomainName
This is a sample to get the IP address information by specifying the domain name using dig.
dig en.linux.perlzemi.com
This is the output result of dig. You can see the IP address.
; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> en.linux.perlzemi.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38193 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;en.linux.perlzemi.com. IN A ;; ANSWER SECTION: en.linux.perlzemi.com. 3600 IN CNAME sakurastd.perlzemi.com. sakurastd.perlzemi.com. 3599 IN A 210.224.185.82 ;; Query time: 103 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Thu Dec 02 13:43:51 JST 2021 ;; MSG SIZE rcvd: 90