Master the Linux ‘whois’ Command: A Comprehensive Guide

Peter Hou
2 min readJun 2, 2023

--

In this article, we have covered a detailed guide on the Linux ‘whois’ command. From the basic usage to advanced techniques, we aim to provide newcomers with a strong foundation in using this command. As an important part of the Linux toolkit, understanding ‘whois’ can provide valuable insight into network resources and aid in troubleshooting tasks.

Instructions

In this article, we provide a comprehensive guide to the ‘whois’ command in Linux. Covering its history, purpose, usage, and common examples, we aim to equip the Linux newbie with the necessary knowledge and skills to navigate the command line efficiently.

History

The ‘whois’ command has been a part of the UNIX and Linux toolkit for decades, making it one of the oldest network tools available. Its creation is largely credited to the need for a system to query databases for domains, people, and other resources connected to the internet.

When and why to use it

The ‘whois’ command is typically used to query information about domain names, IP addresses, and maintainers of internet resources. The command is especially useful for system administrators and security analysts who need to track the ownership or location of an IP address or domain name.

How to use it

To use the ‘whois’ command, type ‘whois’, followed by the domain name or IP address you wish to query.

$ whois example.com

The commonly used parameters

Some of the commonly used parameters with the ‘whois’ command include:

  • -H Don't show the legal disclaimers some registries like to show you.
$ whois -H example.com
  • -i Enables "inverse lookup" for specified attributes.
$ whois -i example.com

Other supported parameters

The ‘whois’ command supports a variety of other parameters, including -l, -m, -c, and many others, each of which offers specific functionality for querying information.

Most common use cases

The ‘whois’ command is most commonly used to determine the registered owner of a domain or IP address.

$ whois example.com

The tricky skills

By combining ‘whois’ with other commands via piping, it is possible to perform more advanced searches, such as looking for specific data within a ‘whois’ return.

$ whois example.com | grep "Creation Date"

What needs to be noted

While ‘whois’ is a powerful tool, it should be noted that the information returned by the command can be manipulated by the owner of the IP address or domain. Always cross-reference data where possible.

Conclusion

The ‘whois’ command is an essential tool for any Linux user. Understanding its usage and parameters can greatly assist in managing and troubleshooting network-related tasks.

--

--

Peter Hou
Peter Hou

Written by Peter Hou

I am a Senior Software Engineer and tech lead in a top tech company.