How to use the whois command on Ubuntu Linux
Last Updated :
17 Apr, 2023
Whois is a command-line utility used in Linux systems to retrieve information about domain names, IP addresses, and network devices registered with the Internet Corporation for Assigned Names and Numbers (ICANN). The data received by Whois consists of the name and contact information of the domain or IP address owner, the registration and expiration date, the domain registrar, and the server information. Whois command can be very useful for network administrators, web developers, and security professionals for achieving various tasks like checking network connectivity or troubleshooting. In this article, we will go through the usage of the Whois command on Linux (Ubuntu system).
Installing Whois Command on Ubuntu
Follow the below number of steps to install the Whois command on Ubuntu.
Step 1: Firstly, update the system using the below command. Execute the below command in the terminal to update the system.
sudo apt update
Step 2: Now, by using the apt manager, install the whois command utility, so that we can retrieve the information about domains, IP Addresses, etc.
sudo apt install whois
Usage of Whois Command on Ubuntu
Example 1: Getting Information on Domain Name (geeksforgeeks.org).
In this example, we will extract the information about the domain (geeksforgeeks.org). In the below screenshot, you can see that we have information like Registry Domain ID, WHOIS Server, Updated Date, etc.
whois geeksforgeeks.org
Some information is kept private due to security issues. As you can see in the below screenshot, information like Phone, Fax, Postal Code, etc information is kept private.
Example 2: Getting Information about IP Address.
In this example, we will be extracting information by giving the IP Address as input to the whois command. In the below screenshot, we have got the information about the IP Address such as NetRange, CIDR, etc.
whois 8.8.8.8
In the below screenshot, detailed information is shown such as OrgTechName, OrgTechPhone, OrgTechEmail, etc. This information can be helpful to diagnose the network connections and also to troubleshoot the network.
Example 3: Getting Information about some specific WHOIS server set up by an ICANN.
WHOIS command is not limited to standard domain or IP address, even we can extract the information of some specific WHOIS server set up by an ICANN. In the below screenshot, we have given the input of the WHOIS Server along with the domain name. We have got the detailed information for this.
whois -h whois.verisign-grs.com google.com
Example 4: Getting Information about a domain name from a specific registrar.
In this example, we will fetch the information about a domain name from a specific registrar. We have given the domain name (whois.iana.org) and the registrar (com).
whois -h whois.iana.org com
Uninstalling Whois Command on Ubuntu
After usage, we can remove the command by uninstalling it. Execute the below command in the terminal to remove the whois command from Ubuntu.
sudo apt remove whois
Conclusion
In conclusion, the whois command is a useful tool for obtaining information about domain names, IP Addresses, and network devices registered with ICANN. Whois command is a simple and powerful tool that can be useful for network administration, web development, and security tasks, and every Linux user should be familiar with its usage. In this article, we have gone through the installation of the whois command and its usage in the form of examples.
Similar Reads
How to Display the current Username in Linux | whoami Command Imagine you're working on your computer and forget who you're logged in as. In Linux, there's a special trick called "whoami" that's like asking "Hey computer, who am I right now?" This article explains how this simple command works and helps you remember who's in charge! Don't worry, it won't be fu
4 min read
nbtstat commnd in Linux The nbstat command is specific to the Windows operating system and is used for troubleshooting NetBIOS name resolution. NetBIOS stands for Network Basic Input/Output System, is a legacy networking protocol used primarily in Microsoft Windows operating systems and some other older systems for local a
3 min read
How to Install and Run UserRecon Tool? UserRecon tool is used to find usernames across over 75 social networks. It is very useful when you are running an investigation to determine the usage of the same username across different social media platforms such as Twitter, Instagram, MySpace, Youtube, Reddit, WordPress, GitHub, and many more.
2 min read
How to Display Path of an Executable File in Linux | Which Command In Linux finding the exact path of an excutable file can be crucial for the system adminstration, scripting and as well for troubleshooting. The `which` command helps with providing a simple and effective way to locate the executable files within the directories that are listed in your system. In th
6 min read
Linux Network Commands Cheat Sheet Linux is a very popular operating system. Many people use it. Developers and network admins need to know Linux network commands well. This article will going explains most of the common Linux network commands in a very easy way and It also has a cheat sheet about these commands. The cheat sheet tell
9 min read