How to Use the Whois Command Line

By Jason Isbell

The Whois database contains information on the owners of domain names.
i Jupiterimages/ Images

Whois is a command that searches the "who is" database for information on the owner of a particular domain name. The information provided can include the contact name, address, email address and phone number. The whois command will also return the name servers and certain status information. Whois started with the earliest networks, was standardized in Arpanet and then became part of the Internet when it was launched. Whois can be used under a Linux or Windows server. There is also software that can be installed on a Windows desktop computer to allow whois to be run on a PC.

Running Whois on Linux

Log into server. If you want to run the command from your Web server, you must first log into the shell prompt for that server. Not all Web hosts allow shell prompt access. Look for SSH, or Secure Shell. This will get you a command prompt to type your commands. If you have Linux on your computer, you can open the command prompt on your computer. Each Linux derivative opens the command prompt in a different way. If you want to run this from a Windows command prompt, see Section 2: Running Whois on Windows.

Type "whois -H " -- where is the domain name you want to lookup. "-H" tells the whois command to hide the extra copyright information. The -H must be in upper case. This will display the important details for the domain name. You can leave off the -H to display the entire lookup, including the legal disclaimer.

There are other switches you can use from the command line; however, the other switches are not often used. If you want to see what switches are available, type "whois" without any switches or see the man page listed under References.

Read the results. The results will be a displayed on the command prompt. You will find several contacts. They will include an administrative contact, a technical contact, and sometimes other contact names. You will also see the IP address that the domain resides on, the name servers they use, and their status.

Some domains have "private" contact information. This means that the Web host has put their contact information into the contact information section. If you want to contact the real domain owner, you will need to go through the host.

Use the -h switch to choose a different host. If the -h switch is not used, will be searched for domain names and for IP addresses. If you want to search a different host, specify it after the -h -- for example: "whois -h"

Running Whois on Windows

Download and install whois software. Windows does not come with whois by default. You can download whois for Windows from Microsoft Technet. See the Resources section.

Open a command prompt. Click "start," "run" and type "cmd" or "command."

Type "whois " where is the domain you want to look up. This whois command does not have the switches that are available from the Linux whois command.