Redhat / CentOS Install whois client

How do I install whois client to see whois information about domain and ip address using command line options under Fedora / RHEL / Redhat / CentOS / Scientific Linux?

The whois command searches for an object in a RFC 3912 database. Red Hat/CentOS/RHEL/Fedora Linux comes with client for the whois directory service called whois or jwhois. The jwhois is a whois client that accepts both traditional and finger-style queries under RHEL. You can install the same using the yum command.

Redhat / CentOS Install whois client command

Login as root and type the following yum command to install the jwhois client:
# yum install jwhois
# yum install whois
Sample outputs:

Loaded plugins: priorities, rhnplugin
70 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package jwhois.x86_64 0:4.0-18.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package      Arch         Version             Repository                  Size
 jwhois       x86_64       4.0-18.el6          rhel-x86_64-server-6       104 k

Transaction Summary
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 104 k
Installed size: 0  
Downloading Packages:
jwhois-4.0-18.el6.x86_64.rpm                             | 104 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : jwhois-4.0-18.el6.x86_64                                 1/1 

  jwhois.x86_64 0:4.0-18.el6                                                    


How do I use whois command?

The syntax is:
whois domain
whois public-ip-address
whois [options] public-ip-address

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. You can use the whois command as follows:
$ whois
$ whois

Sample outputs:

[Redirected to]
%rwhois V-1.5:003fff:00 (by Network Solutions, Inc. V-
network:Organization;I:SoftLayer Technologies, Inc.
network:Street-Address:1950 Stemmons Freeway Suite 2043
%referral rwhois://

Lookup for domain names

Simply run:

Getting help about whois command

Type the following command:
$ man whois
$ whois --help

Usage: whois [OPTION]... OBJECT...
-h HOST, --host HOST   connect to server HOST
-p PORT, --port PORT   connect to PORT
-H                     hide legal disclaimers
      --verbose        explain what is being done
      --help           display this help and exit
      --version        output version information and exit
These flags are supported by and some RIPE-like servers:
-l                     find the one level less specific match
-L                     find all levels less specific matches
-m                     find all one level more specific matches
-M                     find all levels of more specific matches
-c                     find the smallest match containing a mnt-irt attribute
-x                     exact match
-b                     return brief IP address ranges with abuse contact
-B                     turn off object filtering (show email addresses)
-G                     turn off grouping of associated objects
-d                     return DNS reverse delegation objects too
-i ATTR[,ATTR]...      do an inverse look-up for specified ATTRibutes
-T TYPE[,TYPE]...      only look for objects of TYPE
-K                     only primary keys are returned
-r                     turn off recursive look-ups for contact information
-R                     force to show local copy of the domain object even
                       if it contains referral
-a                     also search all the mirrored databases
-s SOURCE[,SOURCE]...  search the database mirrored from SOURCE
-g SOURCE:FIRST-LAST   find updates from SOURCE from serial FIRST to LAST
-t TYPE                request template for object of TYPE
-v TYPE                request verbose template for object of TYPE
-q [version|sources|types]  query specified server info


WHOIS is a query and response protocol used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block. This page explained how to install whois client on Redhat (RHEL)/CentOS using yum command. See whois server list for top level domains here.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 9 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig 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 glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
9 comments… add one
  • Ryan Nov 3, 2011 @ 14:20

    I already installed jwhois but the output is always

    [root@mo ~]# whois
    [Unable to connect to remote host]

    How do I fix this? Is there a port that I need to allow in my firewall?

  • Dan Oct 4, 2012 @ 23:10

    I know the question above is old, but you need to have TCP port 43 open. You may also need to open up ports for referral whois (rwhois), which is usually TCP port 4321.

  • Nick Jun 24, 2013 @ 8:57

    I know it is a reply to an old answer but I have the same issue as Ryan. I have installed jwhois via yum but still have the following result on any domain queried:-
    [root@machine]# whois
    [Unable to connect to remote host]

    Have tried opening both the ports suggested by Dan but still the same issue.
    Help would be very welcome here.

  • Dan Jun 24, 2013 @ 17:54

    Hi, Nick,

    I’m not able to test it currently, but you might want to try testing the connectivity to see if there’s something else blocking your connection. Try:

    telnet 43

    And see if it connects. You can also verify where it’s trying to go with tcpdump:

    tcpdump -s0 -p ‘host’

    Likely the port is blocked, the response is blocked (perhaps missing an established), or the response isn’t recognized (such as PAT changing the IP address or port).


  • Dan Jun 24, 2013 @ 18:00

    By the way, if you’re not on a busy network, you can run tcpdump in promiscuous mode (no -p) and remove the filter to see all of the traffic. I usually write it to a file (-wfilename.cap) and then analyze it with wireshark.

  • Wellington Torrejais da Silva Jun 25, 2014 @ 18:57


  • Rodrigo Pichiñual Aug 21, 2014 @ 20:50


    Always it is usefull have this information avaible

  • samy May 11, 2015 @ 16:38

    Great -works fine!!

  • Franko Mar 24, 2016 @ 8:54

    I had to disable IPv6 address, then works.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum