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
5 min read
How To Setup And Use Anonsurf On kali Linux
Anonsurf is one of the good anonymizing tools of Linux distribution. It helps us make our network tunnel secure. This tool uses TOR iptables to anonymize our network system. Installation of Anonsurf First of all, you can make a separate directory for this tool for your convenience and git clone the
2 min read
What is Sublist3r and How to Use it?
Sublister is a tool designed in python and uses OSINT in order to enumerate subdomains of websites. It helps pen-testers in collecting and gathering subdomains for a domain which is their target. In order to fetch the accurate results, sublilster uses many search engines like Google, Yahoo, etc. and
2 min read
Traceroute Command in Linux with Examples
In networking, understanding the path that data packets take from one point to another is crucial for diagnosing and troubleshooting connectivity issues. One of the most valuable tools for this purpose is the traceroute command in Linux. Traceroute is a command-line tool used in Linux or other opera
8 min read
Netstat command in Linux
The netstat command is like a special tool in Linux that helps you understand and check things about how your computer connects to the internet. It can tell you about the connections your computer is making, the paths it uses to send information, and even some technical details like how many packets
7 min read
How to Send a Message to Logged Users in Linux Terminal?
Linux is a solution to the data center. It is flexible, stable, secure, and reliable. There are many users logged into servers for development purposes, testing, and usage. There are various tools to send messages to other users, but they do not allow widespread sending or sending to specific users
6 min read
How to ping an Ip on windows macos and Linux
Ping is a command line networking utility that uses ICMP packets to check if a logical route is available to communicate with a specific host. A failure of the ping command doesn't necessarily mean that the host is down. There are many other possible reasons for the failure. Along with the primary p
8 min read
Most Useful Commands to Manage Apache Web Server in Linux
Prerequisite: How do Web Servers work? Apache is one of the most widely used free, open-source Web Server applications in the world, mostly used in Unix-like operating systems but can also be used in windows. As a developer or system administrator, it will be very helpful for you to know about the 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
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