Skip to content

whois Linux command

The Linux whois command is a powerful networking tool used to retrieve domain name registration information, IP address assignments, and other related information. By querying the WHOIS database, users can access details about domain registrars, registration dates, name servers, and contact information. This command is essential for network administrators, web developers, and cybersecurity professionals to investigate domain ownership, troubleshoot network issues, and ensure compliance with internet regulations. The syntax typically involves running “whois” followed by the domain name or IP address. Additionally, the whois command offers various options to customize queries and narrow down search results. By mastering the whois command, users can gain valuable insights into the ownership and history of internet resources, making it a must-have tool for managing online assets and addressing network-related concerns.

whois Syntax:

Terminal window
whois [options] [parameters]

Options:

OptionDescription
-hDisplay usage information
-aDo not query for IPv6 address
-p portConnect to specified port
-rQuery without using network
-t typeQuery regarding specified object type
-vDisplay version information
-VShow verbose information
-TOutput in terse mode

Parameters:

ParameterDescription
domainQuery information for the specified domain
nameserverQuery information for the specified name server
IP_addressQuery information for the specified IP address

whois bash Examples:

Check Domain Information

Terminal window
whois example.com

Retrieves and displays the WHOIS information for the domain name “example.com”.

Query IP Address Information

Terminal window
whois 8.8.8.8

Retrieves and displays the WHOIS information for the IP address “8.8.8.8”.

Find Registrar Information

Terminal window
whois -h whois.networksolutions.com example.com

Queries the WHOIS database at “whois.networksolutions.com” to find registrar information for the domain name “example.com”.

Retrieve Name Server Information

Terminal window
whois -h whois.verisign-grs.com example.net

Queries the WHOIS database at “whois.verisign-grs.com” to retrieve name server information for the domain name “example.net”.

Search for Country Code Top-Level Domain (ccTLD) Information

Terminal window
whois .uk

Retrieves and displays the WHOIS information for the country code top-level domain “.uk”.

Check Domain Availability

Terminal window
whois -h whois.verisign-grs.com mynewdomain.com

Checks the availability of the domain name “mynewdomain.com” by querying the WHOIS database at “whois.verisign-grs.com”.

whois Command Help Center:

How do I use whois in Linux?

To use the whois command in Linux, execute the following command:

Terminal window
whois --option <value>

What is the purpose of the whois command in Linux?

The whois command in Linux is used to retrieve domain registration information from a WHOIS server.

How can I query a specific WHOIS server using whois in Linux?

To query a specific WHOIS server using whois in Linux, use the following command:

Terminal window
whois -h <WHOIS_server> <domain_name>

How can I search for a specific field in the WHOIS information using whois in Linux?

To search for a specific field in the WHOIS information using whois in Linux, you can grep the output for the desired information. For example:

Terminal window
whois <domain_name> | grep "Registrant Name"

How do I enable recursive WHOIS queries in Linux using whois?

To enable recursive WHOIS queries in Linux using whois, use the following command:

Terminal window
whois -r <domain_name>

How can I get brief WHOIS information using whois in Linux?

To get brief WHOIS information using whois in Linux, you can use the “-q” option. For example:

Terminal window
whois -q <domain_name>

How can I force a WHOIS query bypassing the local cache in Linux using whois?

To force a WHOIS query bypassing the local cache in Linux using whois, use the following command:

Terminal window
whois -c <domain_name>

How do I get information about the WHOIS command options in Linux?

To get information about the WHOIS command options in Linux, you can use the following command:

Terminal window
whois -h

Applications of the whois command

  • Checking domain registration information
  • Retrieving contact information for a domain owner
  • Identifying the registrar of a domain
  • Verifying domain availability
  • Investigating IP address allocation and ownership information
  • Finding out the expiration date of a domain
  • Researching the name servers associated with a domain
  • Locating technical and administrative contacts for a domain