Question
How do I get a domain name information using shell?
Answer
Use WHOIS command.
While you can retrieve whois information through the control panel, sometimes it is useful to have it plain text, for example, if you want to automate something.
In most cases, a simple whois command works fine:
whois openprovider.com
Some registries (e.g. .com and .net) are known as thin registries - they do not store contact data. They refer to the registrar's whois service instead (search for Registrar WHOIS Server in the output). If your whois application does not query this whois server automatically as well, you can do it yourself using the -h option:
whois -h whois.registrar.eu openprovider.com
Sometimes your whois application cannot find a whois server. This often happens with new gTLDs. In such a case, it's again the -h option that you need. Our extension pages contain the whois servers for most of the registries.
whois -h whois.nic.domains openprovider.domains
Tip: all new gTLDs run their whois server on whois.nic.tld - where "tld" is, of course, the extension that you want to query.