How to install whois on RHEL 8 / CentOS 8

Originally published at: https://www.cyberciti.biz/faq/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?