Linux commands to find IP address of a website
The Linux also provides commands to get IP address a website.
What is an IP address?
The IP address is a network technology designed to allow connected devices to communicate with other devices over the Internet. It is like labelling any device connected to a network so that it can be uniquely identified.
Each device connected to the internet will be assigned a unique IP address.
Two different versions of IP address
An IPv4 address would be like
126.457.14.512 based on decimal(0-9) values.
An IPv6 address would be like:
2001:DB8::8A2E:370:7334 based on hexadecimal(0-9 and A-F) values.
This article shows the usage of command line utilities to get IP address and other details
Find the IP address of a website using dig command
The dig is a network administration command-line utility for Domain Name System (DNS) lookup.
It is useful for troubleshooting network and for educational purposes. It supports Internationalized Domain Name (IDN) queries.
It is quite popular among DNS administrators to troubleshoot DNS problems due to its flexibility and ease of use.
... ;; ANSWER SECTION: duckduckgo.com. 173 IN A 220.127.116.11 ...
The ANSWER SECTION will list the IP address of a website.
Find the IP address of a website using the host command
The host is also network command-line utility for performing Domain Name System (DNS) lookup.
It is most commonly used for converting names to IP addresses and vice versa.
Example of dig command
... duckduckgo.com has address 18.104.22.168 duckduckgo.com mail is handled by 0 duckduckgo-com.mail.protection.outlook.com. ...
In this article, you just saw two networking command utility that gives the desired result to retrieve website IP address in Linux terminal.
Hope you like this quick Linux tip!
Keep helping and happy 😄 coding