itsfosslinux

How to Install whois command on Ubuntu/Debian

In this article, we will see how to install whois command on Ubuntu/Debian based systems. whois is a free and open source tool to check the registry information, contact information and other related information of a domain depending on the domain's privacy settings in Linux based systems. It works by querying WHOIS servers to retrieve information about the registration of a domain name or an IP address range. It is easy to install and use in almost all the linux based systems. Here we will see the steps to install whois command on Ubuntu/Debian based systems.

 

How to Install whois command on Ubuntu/Debian

How to Install whois command on Ubuntu/Debian

Also Read: How to Install whois utility on Ubuntu 20.04

Step 1: Prerequisites

a) You should have a running Ubuntu/Debian Server.

b) You should have sudo or root access to run privileged commands.

c) You should have apt or apt-get utility available in your Server.

d) You should have minimum system configuration (2GB Memory, 40 GB HDD) to run whois utility as it is a very lightweight command line utility.

 

Step 2: Update Your Server

To keep your server safe and secure, it is absolutely necessary to regularly check and install all the latest available updates by using sudo apt update && sudo apt upgrade command as shown below.

itsfosslinux@ubuntu:~$ sudo apt update && sudo apt upgrade
Ign:1 https://pkg.jenkins.io/debian-stable binary/ InRelease
Hit:2 https://pkg.jenkins.io/debian-stable binary/ Release
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:7 https://repositories.timber.io/public/vector/deb/ubuntu focal InRelease [4,947 B]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:9 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:10 https://download.sublimetext.com apt/stable/ InRelease
Hit:12 https://ngrok-agent.s3.amazonaws.com buster InRelease
............................................

 

Step 3: Install whois

In the next step, you can install whois package from default Ubuntu repo by using either sudo apt install whois or sudo apt-get install whois command as shown below. This will download and install the package along with all its required dependencies.

itsfosslinux@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.3 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: Verify Installation

After installing the package, you can verify all the installed files path by running dpkg -L whois command as shown below.

itsfosslinux@ubuntu:~$ dpkg -L whois
/.
/usr
/usr/bin
/usr/bin/mkpasswd
/usr/bin/whois
/usr/share
/usr/share/doc
/usr/share/doc/whois
/usr/share/doc/whois/README
/usr/share/doc/whois/changelog.gz
/usr/share/doc/whois/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/mkpasswd.1.gz
/usr/share/man/man1/whois.1.gz
/usr/share/man/man5
/usr/share/man/man5/whois.conf.5.gz

 

 

Step 5: Check Version

You can also check the current installed version of whois utility by running whois --version command as shown below.

itsfosslinux@ubuntu:~$ whois --version
Version 5.5.6.

Report bugs to <[email protected]>.

 

Step 6: Using whois

It is now time to test the utility by querying domain information from WHOIS server. For our example purpose, here we are querying all the information about domain google.com using whois google.com command as shown below.

itsfosslinux@ubuntu:~$ whois google.com
Domain Name: GOOGLE.COM
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2019-09-09T15:39:04Z
Creation Date: 1997-09-15T04:00:00Z
Registry Expiry Date: 2028-09-14T04:00:00Z
Registrar: MarkMonitor Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2086851750
Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Name Server: NS3.GOOGLE.COM
Name Server: NS4.GOOGLE.COM
DNSSEC: unsigned
.......................................................

 

Step 7: Uninstall whois

If you no longer need whois utility in your system then you can remove it by running sudo apt remove whois command as shown below.

itsfosslinux@ubuntu:~$ sudo apt remove whois
[sudo] password for itsfosslinux:
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) ...

Leave a comment