How to lookup a domain or IP in Linux

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

jwhois is a whois client that accepts both traditional and finger-style queries under RHEL. You can install the same using the yum command. Login as root and type the following command to install the jwhois client:

# yum install jwhois

Sample Output

# yum install jwhois
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package jwhois.x86_64 0:4.0-19.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================================================
 Package                                        Arch                                           Version                                             Repository                                    Size
======================================================================================================================================================================================================
Installing:
 jwhois                                         x86_64                                         4.0-19.el6                                          base                                         104 k

Transaction Summary
======================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 104 k
Installed size: 294 k
Is this ok [y/N]: y
Downloading Packages:
Trying other mirror.
jwhois-4.0-19.el6.x86_64.rpm                                                                                                                                                   | 104 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : jwhois-4.0-19.el6.x86_64                                                                                                                                                           1/1
  Verifying  : jwhois-4.0-19.el6.x86_64                                                                                                                                                           1/1

Installed:
  jwhois.x86_64 0:4.0-19.el6

Complete!

Source: Cyberciti.