Using whois command in Linux
 

Using whois command in Linux

 

This post was last updated on January 16th, 2021 at 12:13 pm

Whois command in Linux searches in a WHOIS database. This database stores the registered users of an internet resource such as domain name, IP address, etc. Running a whois command queries and fetches the required information from this database.

In this article, we will discuss the usage of the whois command in Linux.

How to install whois in Linux

In some Linux distribution, you may find it pre-installed. But if it is not in your system you can use one of the given commands to install it –

To install whois on Debian/ Ubuntu/ Linux Mint etc use –

sudo apt install whois

Or if you are using RHEL/CentOS then use –

sudo yum install whois

In Fedora use –

sudo dnf install whois

If you want to install it on an Arch Linux based distro use –

sudo pacman -Syu whois

Once it gets successfully installed on your system you can start using it.

Querying a domain name with whois command

We can use the whois command to query a domain name or IP address. The simplest form of using the whois command is given below –

whois domain_name

For example –

whois google.com

You can see the output of this command in the given image –

There are certain options available that you can use with the whois command. The detailed syntax of using the whois command is given on its manual page.

Execute the following command in your terminal to view the man page of whois command –

man whois

Some important terms related to the domain are –

Domain name registry – It is a database of domains and associated registrant information

Registrant – Is the person or group who is the legal owner of the domain name

Registrar – A domain name is registered through a registrar

The output of this command also includes information such as availability, creation, expiration details, and nameservers, etc.

Querying an IP address with whois command

You can find the information related to an IP address by using the whois command. Use the following command to querying an ip address –

whois 8.8.8.8

This will display the output as given in the image –

You can see the full output of this command by scrolling it. Here you will see the details like person or organization name, address, registration date, etc.

Conclusion

Now you know how to find the information of a domain name or IP address. If you have a query related to this then write us in the comments below.

Previous [ubuntu] Just upgraded to Ubuntu 20.04 from 18.04; terminal bell not working
Next Using ping command in Linux
 

About author

You might also like

Commands 0 Comments

How to rename files & directories in Linux?

There are various ways in which you can rename the files or directories on a Linux system. If you are using a system with a graphical user interface then you

Commands 0 Comments

Using systemctl command in Linux

The systemctl command in Linux is responsible for controlling a widely adopted “systemd” init system and service manager. The init is the first process that starts when you power on

Commands 0 Comments

How To Find UID And GID Using Id Command In Linux/Unix?

This post was last updated on August 1st, 2020 at 12:45 pmLinux/Unix are multi-user operating systems that means different users can access and use system resources simultaneously. To access the

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply