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
How to add User in Linux | useradd Command
useradd is a command in Linux that is used to add user accounts to your system. It is just a symbolic link to adduser command in Linux and the difference between both of them is that useradd is a native binary compiled with the system whereas adduser is a Perl script that uses useradd binary in the
5 min read
Practical Uses of nc(netcat) command in Linux
Netcat is one of the most powerful networking tools, security tools, and network monitoring tools. It is even considered a Swiss army knife of networking tools. It acts like a cat command over a network. It is generally used for the following reasons:Operation related to TCP, UDP, or UNIX-domain soc
7 min read
How to Read Manual Pages in Linux | man Command
The "man" command, short for manual, is a powerful tool in the Linux operating system that allows users to access detailed information about various commands, utilities, and system calls. The "man" command provides comprehensive documentation, helping users understand how to use and configure differ
9 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
Telnet Command in Linux
Telnet serves as a command line interface (CLI) tool that allows logging in and communication with a system through a TCP/IP network. Users can issue commands on a remote machine as Telnet users can log into a machine over a TCP/IP network with the use of Telnet addresses (e.g. telnet://user@hostnam
7 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
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
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