A resposta curta à sua pergunta, supondo que você esteja usando a biblioteca whois do debian / ubuntu, é usar
$ whois -h whois.crsnic.net "domain google.com"
Aqui está a resposta longa.
O TLD .COM é um WHOIS fino . Quando você executa uma consulta WHOIS, a ferramenta WHOIS primeiro envia uma consulta WHOIS para a Verisign (hostname whois.crsnic.net) e extrai a referência da resposta.
Por padrão, quando você consulta a Verisign a partir do domínio example.com, o Whois realiza uma pesquisa muito ampla da string "example.com" em vários objetos diferentes, incluindo o nome do domínio, o nome do registrador e os servidores de nomes.
Você pode refinar a consulta especificando uma palavra-chave, conforme descrito na documentação da Verisign. link
O comando acima faz exatamente o que eu expliquei. Em vez de google.com, ele envia à Verisign a consulta completa "domain google.com". Você precisa passar explicitamente o sinalizador -h porque Whois tenta adivinhar o nome do host para consultar a consulta, mas ele falhará porque não reconhecerá a consulta "domínio google.com" como um domínio válido.
Aqui está o resultado do comando.
$ whois -h whois.crsnic.net "domain google.com"
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: GOOGLE.COM
Registrar: MARKMONITOR INC.
Whois Server: whois.markmonitor.com
Referral URL: http://www.markmonitor.com
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Name Server: NS3.GOOGLE.COM
Name Server: NS4.GOOGLE.COM
Status: clientDeleteProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Status: serverDeleteProhibited
Status: serverTransferProhibited
Status: serverUpdateProhibited
Updated Date: 15-sep-2010
Creation Date: 15-sep-1997
Expiration Date: 14-sep-2011
>>> Last update of whois database: Wed, 30 Mar 2011 08:50:16 UTC <<<
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.