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. The following commands also works on older version such as CentOS/RHEL 7.x.
How to install whois on RHEL 8
Procedure to install whois as follows on a CentOS/RHEL (Red Hat Enterprise Linux) version 8:
- Open the terminal app on CentOS 8. For remote RHEL 8 server login using ssh user@server-ip-here command
- Enable EPEL repo on CentOS 8 (see how to enable EPEL repo on RHEL 8). :
- Install whois client, execute: sudo yum install whois
- Test it: whois public-ipv4-here OR whois cyberciti.biz
Let us see all examples and commands in details.
Update: We can install the whois client on the latest version of CentOS or RHEL 8 without using the EPEL repo. So all you have to do is type:
sudo yum install whois
OR
sudo dnf install whois
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
Search for the package:
sudo yum search whois
Sample outputs:
Last metadata expiration check: 0:49:29 ago on Mon Nov 23 11:43:58 2020. Available Packages Name : whois Version : 5.5.1 Release : 2.el8 Architecture : x86_64 Size : 78 k Source : whois-5.5.1-2.el8.src.rpm Repository : AppStream Summary : Improved WHOIS client URL : http://www.linux.it/~md/software/ 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 : whois.networksolutions.com for NIC handles or whois.arin.net 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 ================================================================================ Installing: 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 Installed: whois-5.5.1-1.el8.x86_64 whois-nls-5.5.1-1.el8.noarch Complete!
Installing whois on an RHEL 8 Linux server
First enable on EPEL repo on RHEL 8, execute the following commands:
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-*-rpms"
$ sudo yum repolist
Install it:
sudo yum search whois
sudo yum install whois
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
whois cyberciti.biz
whois 69.164.200.202
Conclusion
You learned how to install whois client on a CentOS or RHEL (Red Hat Enterprise Linux) version 8 server. See whois command examples.
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |