How to find an IP address of a website or domain using terminal?
Finding the public IP address of a website’s server is absolutely easy. In fact, there are several ways you can find the IP address of a website. I am going to show you some of them here.
You might need to install
nslookup. If you have the rights, you can use your Linux distribution’s installation command to install this tool. On Debian and Ubuntu, the command below will install
sudo apt install nslookup
Once you have the tool, just use it in the following fashion:
Same goes for
You’ll have to use
Ctrl+C to stop the
ping command. A sample output of
nslookup command looks like this:
user@host:~$ nslookup google.com Server: 192.168.1.2 Address: 192.168.1.2#53 Non-authoritative answer: Name: google.com Address: 184.108.40.206 Name: google.com Address: 2a00:1450:4017:800::200e
You can use the same way the
dig command, which have some great functionality for dealing with DNS and NS.