How to install whois on RHEL 8 / CentOS 8

I deployed RHEL 8 in the cloud server. However, I am unable to find the whois command on my newly created RHEL 8 Linux server. It says ‘-bash: whois: command not found‘ I tried yum install whois, but it failed too. How do I install whois command on RHEL/CentOS 8 Linux using the command line?

whois command searches for an object in an RFC 3912 database. For example, you can find out who is the owner of an IP address or domain name. It is useful to report spam or other issues. However, whois client removed from RHEL 8 and CentOS 8 Linux system. This page explains how to install the whois client on a CentOS/RHEL 8 based system.


How to install whois on RHEL 8

Procedure to install whois as follows on a CentOS/RHEL (Red Hat Enterprise Linux) version 8:

  1. Open the terminal app on CentOS 8. For remote RHEL 8 server login using ssh user@server-ip-here command
  2. Enable EPEL repo on CentOS 8 (see how to enable EPEL repo on RHEL 8). :
  3. Install whois client, execute: sudo yum install whois
  4. Test it: whois public-ipv4-here OR whois

Let us see all examples and commands in details.

Install whois on a CentOS 8 Linux box

Turn on EPEL repo on CentOS 8, run the following yum commands:
sudo yum install epel-release
sudo yum config-manager --set-enabled PowerTools
sudo yum repolist

Install whois on CentOS 8 Linux by enabling EPEL repo
Search for the package:
sudo yum search whois
Sample outputs:

Last metadata expiration check: 0:27:16 ago on Tuesday 01 October 2019 06:38:00 PM UTC.
======================== Summary & Name Matched: whois =========================
whois.x86_64 : Improved WHOIS client
whois-nls.noarch : Gettext catalogs for whois tools

Find info about the whois package on CentOS 8 box:
sudo yum info whois
Sample outputs:

Last metadata expiration check: 1:33:27 ago on Tuesday 01 October 2019 05:36:22 PM UTC.
Available Packages
Name         : whois
Version      : 5.5.1
Release      : 1.el8
Arch         : x86_64
Size         : 77 k
Source       : whois-5.5.1-1.el8.src.rpm
Repo         : epel
Summary      : Improved WHOIS client
URL          :
License      : GPLv2+
Description  : Searches for an object in a RFC 3912 database.
             : This version of the WHOIS client tries to guess the right server
             : to ask for the specified object. If no guess can be made it will
             : connect to for NIC handles or
             : for IPv4 addresses and network names.

Let us install whois client:
sudo yum install whois
Sample outputs:

Last metadata expiration check: 1:34:15 ago on Tuesday 01 October 2019 05:36:22 PM UTC.
Dependencies resolved.
 Package            Arch            Version                 Repository     Size
 whois              x86_64          5.5.1-1.el8             epel           77 k
Installing dependencies:
 whois-nls          noarch          5.5.1-1.el8             epel           37 k
Transaction Summary
Install  2 Packages
Total download size: 114 k
Installed size: 343 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): whois-nls-5.5.1-1.el8.noarch.rpm         362 kB/s |  37 kB     00:00    
(2/2): whois-5.5.1-1.el8.x86_64.rpm             744 kB/s |  77 kB     00:00    
Total                                            65 kB/s | 114 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : whois-nls-5.5.1-1.el8.noarch                           1/2 
  Installing       : whois-5.5.1-1.el8.x86_64                               2/2 
  Running scriptlet: whois-5.5.1-1.el8.x86_64                               2/2 
  Verifying        : whois-5.5.1-1.el8.x86_64                               1/2 
  Verifying        : whois-nls-5.5.1-1.el8.noarch                           2/2 
  whois-5.5.1-1.el8.x86_64             whois-nls-5.5.1-1.el8.noarch            

Installing whois on an RHEL 8 Linux server

First enable on EPEL repo on RHEL 8, execute the following commands:
$ sudo yum install
$ sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-*-rpms"
$ sudo yum repolist

RHEL 8 install whois client by enabling EPEL repo
Install it:
sudo yum search whois
sudo yum install whois

whois command not found on RHEL 8

How do I use whois client?

whois is a useful command for Linux and Unix users if you want to find out the following info:

  • Find out the names of the DNS servers for a domain
  • Obtain the name of the administrative contact for a domain including the name of a company or organization whose domain name you know
  • Contact IP or domain owner to report abuse or misconfiguration issues and more.

The syntax is:
whois IP-address
whois domain-name
whois [options] objects

RHEL or CentOS 8 install whois and use it to query IP address


You learned how to install whois client on a CentOS or RHEL (Red Hat Enterprise Linux) version 8 server. See whois command examples here.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04


Comments on this entry are closed.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.