Table of Contents
In this article, we will see how to install whois utility on Ubuntu 20.04 based systems. If you are looking for the registration details of the domain, including the owner's name (or organization's name), contact information, registration and expiration dates, and more then there is no better tool than whois utility. All of need to do is to download and install the utility from default Ubuntu repository. This can be done by following few simple steps which has been described in below section.
How does it work
Whenever you run whois command with a domain name or ip address, the command sends a query to WHOIS servers which then searches its database for the queried domain or ip address. The WHOIS server is basically determined from the top level domain. So for example, if you are searching for domain
example.com then it will redirect the request to a WHOIS server which is responsible for handling
".com" domain registration. The database then look for registrant information and return the details to user based on registrar policies and the domain's privacy settings.
How to Install whois utility on Ubuntu 20.04
Step 1: Prerequisites
a) You should have a running
Ubuntu 20.04 Server.
b) You should have
root access to run privileged commands.
c) You should have
apt-get utility available in your Server.
Step 2: Update Your Server
Before installing any new packages, it is always essential to look for the latest updates and installed them first by using
sudo apt update && sudo apt upgrade command as shown below. This will safeguard your systems from any external or internal vulnerabilities.
cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Step 3: Install whois
In the next step, you can install whois utility by running
sudo apt install whois command as shown below. This will download and install the package from default Ubuntu repo with all its required dependencies.
cyberithub@ubuntu:~$ sudo apt install whois Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: whois 0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded. Need to get 44.7 kB of archives. After this operation, 279 kB of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu focal/main amd64 whois amd64 5.5.6 [44.7 kB] Fetched 44.7 kB in 1s (37.8 kB/s) Selecting previously unselected package whois. (Reading database ... 272511 files and directories currently installed.) Preparing to unpack .../archives/whois_5.5.6_amd64.deb ... Unpacking whois (5.5.6) ... Setting up whois (5.5.6) ... Processing triggers for man-db (2.9.1-1) ...
Step 4: Check Status
After successful installation, you can check the package status by running
dpkg -s whois command as shown below. This will show the package installation status as you can see below.
cyberithub@ubuntu:~$ dpkg -s whois Package: whois Status: install ok installed Priority: standard Section: net Installed-Size: 272 Maintainer: Ubuntu Developers <firstname.lastname@example.org> Architecture: amd64 Version: 5.5.6 Depends: libc6 (>= 2.25), libidn2-0 (>= 2.0.3) Description: intelligent WHOIS client This package provides a commandline client for the WHOIS (RFC 3912) protocol, which queries online servers for information such as contact details for domains and IP address assignments. It can intelligently select the appropriate WHOIS server for most queries. . The package also contains mkpasswd, a features-rich front end to the password encryption function crypt(3). Original-Maintainer: Marco d'Itri <email@example.com>
Step 5: Check Version
You can also check the current installed package version by using
whois --version command as shown below. As you can see the current installed version is
cyberithub@ubuntu:~$ whois --version Version 5.5.6. Report bugs to <firstname.lastname@example.org>.
Step 6: Using whois
Now that whois utility is installed in the system, let's use it to find the information about a domain. For example, here we are querying information about domain
example.com from WHOIS server using
whois example.com command as shown below.
cyberithub@ubuntu:~$ whois example.com Domain Name: EXAMPLE.COM Registry Domain ID: 2336799_DOMAIN_COM-VRSN Registrar WHOIS Server: whois.iana.org Registrar URL: http://res-dom.iana.org Updated Date: 2023-08-14T07:01:38Z Creation Date: 1995-08-14T04:00:00Z Registry Expiry Date: 2024-08-13T04:00:00Z Registrar: RESERVED-Internet Assigned Numbers Authority Registrar IANA ID: 376 Registrar Abuse Contact Email: Registrar Abuse Contact Phone: Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Name Server: A.IANA-SERVERS.NET Name Server: B.IANA-SERVERS.NET ...............................................
Step 7: Uninstall whois
Once you are done using whois command, you can choose to uninstall it from your system by using
sudo apt remove whois command as shown below.
cyberithub@ubuntu:~$ sudo apt remove whois [sudo] password for cyberithub: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: whois 0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded. After this operation, 279 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 272519 files and directories currently installed.) Removing whois (5.5.6) ... Processing triggers for man-db (2.9.1-1) ...