
jwhois Command in Linux
whois and jwhois are command-line utilities used to get information about Internet domains. The retrieved information includes the domain name, ownership, registration dates, and contact information. The classic whois and jwhois commands serve the same purpose of retrieving domain registration information. However, the output of the jwhois command is well-organized and easy to understand.
Table of Contents
Here is a comprehensive guide to the options available with the jwhois command −
- What is jwhois?
- jwhois Installation on Linux
- Examples of jwhois Command in Linux
- jwhois Help and Manual Pages
What is jwhois?
jwhois searches Whois servers for information based on what you enter in the command line. It determines which host to check from three possible sources: a global configuration file, a file you specify, or directly from your input.
Basic Syntax
The basic syntax to run this command in Linux is illustrated in the following snippet −
jwhois [ OPTIONS ]... [ QUERY ]
Replace the QUERY with the domain name or object you want to search for.
Options
The jwhois command can accept several options to modify the command's functionality and customize the information you get −
Options | Description |
---|---|
-c FILE, --config=FILE | It specifies FILE as the configuration file instead of the default. |
-h HOST, --host=HOST | Override hosts in the configuration file and query HOST directly. |
-p PORT, --port=PORT | It lets us specify the port number for querying a HOST. |
-f, --force-lookup | It forces a query to a host, ignoring the cache. |
-n, --no-redirect | It disables query redirection features. |
-s, --no-whoisservers | It disables inbuilt support for whois-servers.net. |
-a, --raw | It sends the query to receiving hosts exactly as it is, without changing anything. |
-i --display-redirections | It shows every step in a redirection (by default, it shows only the last answer). |
-d, --disable-cache | It disables reading and writing to the cache, completely. |
-r, --rwhois | It forces the use of the rwhois protocol instead of HTTP or whois. |
--rwhois-display=DISPLAY | It requests rwhois servers to display results in the specified DISPLAY. |
--rwhois-limit=LIMIT | It limits responses from rwhois servers to the specified LIMIT matches. |
-v, --verbose | It enables verbose debugging information. Use multiple -v for increased verbosity. |
--version | It returns the version number, authors, and licensing information. |
--help | It shows a brief help page for the jwhois command. |
jwhois Installation in Linux
You can install jwhois on your Linux distribution by using your distribution-specific package manager, as follows −
#for Debian-based system sudo apt install jwhois #for fedora sudo dnf install jwhois #for Arch Linux sudo pacman -S jwhois
You can confirm the jwhois installation on your system by executing the following command −
jwhois --version
This command will return the jwhoisâ installed version.
Examples of jwhois Command in Linux
Letâs consider the following examples to understand how the jwhois command works in Linux −
Basic Usage
You can run the jwhois command without any optional argument to perform the WHOIS lookup for the specified domain −
jwhois tutorialspoint.com
This command will return the domainâs registration details, including its registrar, creation, and expiration dates, name servers, and contact information.
Specify a WHOIS Server
You can run the jwhois command with the -h option to specify a WHOIS server to query −
jwhois -h whois.verisign-grs.com tutorialspoint.com
This command will get information from a specific server (whois.verisign-grs.com) rather than the default one.
WHOIS Lookup for an IP Address
We can run the jwhois command with a specific IP address to get the information about the specified IP address. For example, the command below shows the details about Googleâs public DNS server −
jwhois 8.8.8.8
Using jwhois Command with a Custom Port
You can run the jwhois command with the -p option to specify a different port for the WHOIS server −
jwhois -h whois.example.com -p 43 tutorialspoint.com
Here, port 43 is the standard port used for WHOIS lookups.
Getting Information with Verbose Output
You can run the jwhois command with the -v option to get more detailed output −
jwhois -v tutorialspoint.com
Getting Information About Multiple Domains
You can check the information about multiple domains using the jwhois command. For this purpose, sue the following syntax −
jwhois domain1.com domain2.com
jwhois Help and Manual Pages
To learn more about the available options and usage of the jwhois command, you can view the help or manual pages by running the following commands −
jwhois --help man jwhois
Thatâs all about the use of jwhois command in Linux.
Conclusion
whois and jwhois are useful command-line utilities for getting information about internet domains, such as ownership and registration details. While both tools serve a similar purpose, jwhois offers a more organized and user-friendly output.
In this tutorial, we explored the installation and various functionalities of jwhois, including how to specify WHOIS servers, perform IP address lookups, and use different options to customize queries.