Find IP Address of a Domain in Terminal
In your Linux system you can find the IP address of a domain in your terminal application without any help of third party web service. You can also check multiple domains at once. This article explains how to get the IP address of a domain in command line method using the terminal application. We are using Ubuntu to test all these commands. All these command-line tools are per-installed in your Ubuntu system. Open your terminal application (ctrl+alt+t) and run all below commands one by one to check the results.
1. Find IP Address of a Domain using host Command
Host Command is a simple command-line application to perform DNS Domain Name System lookup operations. In terminal run
host connectwww.com | grep "has address" | sed 's/has address/-/g'
2. Find IP Address of a Domain using nslookup Command
nslookup is a free network administration command-line tool for querying the DNS records.
3. Find IP Address of a Domain using ping Command
ping Packet Internet Groper is a free and small networking tool.
ping -c 3 connectwww.com
4. Find IP Address of a Domain using dig Command
dig is small command-line tool for querying DNS records and also called domain information groper.