How to install and run whois command in Windows 10
In Linux, whois command is used to find out the information about a domain, such as the owner of the domain, the owner’s contact information, and the name servers that the domain is using.
It allows you to perform lookup of owner information of a website by querying databases that store the registered users of a domain or IP address.
But if you try to run the same command on a Windows machine, you will face the following error:
> whois youtube.com
'whois' is not recognized as an internal or external command,
operable program or batch file.
In order to resolve the ‘whois’ not recognized, we need to manually install a Whois program.
Let’s do it. After installation and adding path, It will work on any version of Windows including Windows 10:
- Download Whois Program from Microsoft’s site.
- Create a folder in your computer( eg. whois) and Extract the content of the downloaded zip file to your created folder.
- example — D:\whois
- You will find whois.exe and whois64.exe under your extracted location. In my case it is D:\whois\whois.exe and D:\whois\whois64.exe
- Open command prompt. (Press Win+R keys and type ‘cmd’ then hit enter)
- Navigate to the directory where you extracted the whois.exe. In my case I will type
> cd D:\whois
- Run ‘whois’ command now and it should work. Example —
D:\whois> whois google.com
Using the method shown above, you will now be able to run ‘whois’ command from the directory where you stored the program.
However, if you want to run the ‘whois’ command from anywhere then you can add the directory (in my case D:\whois) to the system PATH environment variable.
Adding the your ‘whois’ directory path to Windows system PATH
Open System in Control Panel — -> Go to Advanced System Settings — -> Click on Environment Variables —> Define a new System Variable with
Close and reopen your command prompt for allowing the changes to take place. Now, you will be able to run the WHOIS command from any path inside command prompt.
> whois.exe [-v] domainname [whois.server]
Example : —
whois.exe -v google.com
Note : — If you are using Mac or Linux machine, then It’s already there in your system and no need to install externally like windows system.