The whois command is a utility in Linux that allows users to look up information about domain names and IP addresses. It can be employed to look for the details of the owner who registered the domain, as well as the domain’s availability and expiration date. whois can also be used to find out the organization responsible for managing an IP address, as well as the location and contact information for that organization.
In addition to domain and IP information, whois can also be used to retrieve information about individuals, such as their name, address, and phone number. This can be useful for tracking down the owner of a particular domain or IP address, or for verifying the identity of someone you are communicating with online.
Overall, the whois command is a powerful and useful tool for anyone working with domain names, IP addresses, or online identities. Whether you are a network administrator, a web developer, or just someone who is curious about the details of a particular domain or IP, whois can provide valuable information and help you better understand the online world.
In this guide, we will explore the steps that you need to perform to install and use the whois command in Ubuntu 22.04 (or Debian).
Update your repositories
Like with any other installation, it’s highly recommended to update your repos before starting the installation. You can execute the following to kickstart the upgrade process:
$sudo apt update && sudo apt upgrade -y
Doing so will help us ensure that there are no pending updates that cause issues during the installation process.
Though it comes pre-installed with many Ubuntu systems if you don’t have it on yours, here’s how you can do it. The good thing about this installation is that whois is available by default through the official Ubuntu repositories. You can simply install the utility using this:
$sudo apt install whois
Though you can start using whois when you get the prompt back, if you want to verify the successful completion of the installation, you can run this:
With this output, we can be sure that whois has been installed without any errors.
Using the whois command
As we discussed in the opening, we can use the command to pull up information on domain names and IP addresses alike. You can use it as such:
You can replace “facebook.com” with an IP address to pull up information similarly.
You will see a lot of information pulled up for you, but you can focus on a few attributes to gather the information you need. Some of the most noteworthy attributes that you might find include:
- Registrant information: This includes the name, organization, as well as the contact information of the person or entity that registered the domain.
- Administrative and technical contact information: These are the names and contact details of the individuals responsible for managing and maintaining the domain.
- Name servers: These are the DNS servers used for the domain name lookup.
- Domain status: This indicates the current status of the domain, such as whether it is active or suspended.
- Creation and expiration dates: These are the dates when the domain was registered and when it will expire, respectively.
- Registrar information: This includes the name along with the contact details of the company that registered the domain.
Keep in mind that not all of these attributes will be available for every domain, and the specific information that is returned may vary depending on the registrar and the type of domain.Top of Form
Though it is a very tiny utility and doesn’t take up any significant amount of disk space if you want to remove whois from your computer, you can do so using this:
$sudo apt purge whois
This will completely remove whois along with all of its configuration files from your computer.
The whois command comes in handy when looking for the contact information for domains or an IP address in the event of a networking problem.
Let us know if you run into any conflicts or errors throughout the guide and we’ll look into the issue for you. You can also reach out if you have any queries, thoughts or concerns through the comments area below. Cheers.