1.\" Copyright (c) 1985, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.Dd August 1, 2019 29.Dt WHOIS 1 30.Os 31.Sh NAME 32.Nm whois 33.Nd "Internet domain name and network number directory service" 34.Sh SYNOPSIS 35.Nm 36.Op Fl aAbfgiIklmPQrRS 37.Op Fl c Ar TLD | Fl h Ar host 38.Op Fl p Ar port 39.Op Fl - 40.Ar name ... 41.Sh DESCRIPTION 42The 43.Nm 44utility looks up records in the databases maintained by several 45Network Information Centers 46.Pq Tn NICs . 47.Pp 48By default 49.Nm 50starts by querying the Internet Assigned Numbers Authority (IANA) whois server, 51and follows referrals to whois servers 52that have more specific details about the query 53.Ar name . 54The IANA whois server knows about 55IP address and AS numbers 56as well as domain names. 57.Pp 58There are a few special cases where referrals do not work, so 59.Nm 60goes directly to the appropriate server. 61These include point-of-contact handles for ARIN, 62.Pa nic.at , 63NORID, and RIPE, 64and domain names under 65.Pa ac.uk . 66.Pp 67The options are as follows: 68.Bl -tag -width indent 69.It Fl a 70Use the American Registry for Internet Numbers 71.Pq Tn ARIN 72database. 73It contains network numbers used in those parts of the world covered neither by 74.Tn APNIC , AfriNIC , LACNIC , 75nor by 76.Tn RIPE . 77The query syntax is documented at 78.Pa https://www.arin.net/resources/whoisrws/whois_api.html#nicname 79.It Fl A 80Use the Asia/Pacific Network Information Center 81.Pq Tn APNIC 82database. 83It contains network numbers used in East Asia, Australia, 84New Zealand, and the Pacific islands. 85Get query syntax documentation using 86.Ic whois -A help 87.It Fl b 88Use the Network Abuse Clearinghouse database. 89It contains addresses to which network abuse should be reported, 90indexed by domain name. 91.It Fl c Ar TLD 92This is the equivalent of using the 93.Fl h 94option with an argument of 95.Qq Ar TLD Ns Li .whois-servers.net . 96This can be helpful for locating country-class TLD whois servers. 97.It Fl f 98Use the African Network Information Centre 99.Pq Tn AfriNIC 100database. 101It contains network numbers used in Africa and the islands of the 102western Indian Ocean. 103Get query syntax documentation using 104.Ic whois -f help 105.It Fl g 106Use the US non-military federal government database, which contains points of 107contact for subdomains of 108.Pa .GOV . 109.It Fl h Ar host 110Use the specified host instead of the default. 111Either a host name or an IP address may be specified. 112.It Fl i 113Use the traditional Network Information Center (InterNIC) 114.Pq Pa whois.internic.net 115database. 116This now contains only registrations for domain names under 117.Pa .COM , 118.Pa .NET , 119.Pa .EDU . 120You can specify the type of object to search for like 121.Ic whois -i ' Ns Ar type Ar name Ns Ic ' 122where 123.Ar type 124can be 125.Nm domain , nameserver , registrar . 126The 127.Ar name 128can contain 129.Li * 130wildcards. 131.It Fl I 132Use the Internet Assigned Numbers Authority 133.Pq Tn IANA 134database. 135.It Fl k 136Use the National Internet Development Agency of Korea's 137.Pq Tn KRNIC 138database. 139It contains network numbers and domain contact information 140for Korea. 141.It Fl l 142Use the Latin American and Caribbean IP address Regional Registry 143.Pq Tn LACNIC 144database. 145It contains network numbers used in much of Latin America and the 146Caribbean. 147.It Fl m 148Use the Route Arbiter Database 149.Pq Tn RADB 150database. 151It contains route policy specifications for a large 152number of operators' networks. 153.It Fl p Ar port 154Connect to the whois server on 155.Ar port . 156If this option is not specified, 157.Nm 158defaults to port 43. 159.It Fl P 160Use the PeeringDB database of AS numbers. 161It contains details about presence at internet peering points 162for many network operators. 163.It Fl Q 164Do a quick lookup; 165.Nm 166will not attempt to follow referrals to other whois servers. 167This is the default if a server is explicitly specified 168using one of the other options or in an environment variable. 169See also the 170.Fl R 171option. 172.It Fl r 173Use the R\(aaeseaux IP Europ\(aaeens 174.Pq Tn RIPE 175database. 176It contains network numbers and domain contact information 177for Europe. 178Get query syntax documentation using 179.Ic whois -r help 180.It Fl R 181Do a recursive lookup; 182.Nm 183will attempt to follow referrals to other whois servers. 184This is the default if no server is explicitly specified. 185See also the 186.Fl Q 187option. 188.It Fl S 189By default 190.Nm 191adjusts simple queries (without spaces) to produce more useful output 192from certain whois servers, 193and it suppresses some uninformative output. 194With the 195.Fl S 196option, 197.Nm 198sends the query and prints the output verbatim. 199.El 200.Pp 201The operands specified to 202.Nm 203are treated independently and may be used 204as queries on different whois servers. 205.Sh ENVIRONMENT 206.Bl -tag -width WHOIS_SERVER 207.It Ev WHOIS_SERVER 208The primary default whois server. 209If this is unset, 210.Nm 211uses the 212.Ev RA_SERVER 213environment variable. 214.It Ev RA_SERVER 215The secondary default whois server. 216If this is unset, 217.Nm 218will use 219.Pa whois.iana.org . 220.El 221.Sh EXIT STATUS 222.Ex -std 223.Sh EXAMPLES 224To obtain contact information about an 225administrator located in the Russian 226.Tn TLD 227domain 228.Qq Li RU , 229use the 230.Fl c 231option as shown in the following example, where 232.Ar CONTACT-ID 233is substituted with the actual contact identifier. 234.Pp 235.Dl Ic whois -c RU CONTACT-ID 236.Pp 237(Note: This example is specific to the 238.Tn TLD 239.Qq Li RU , 240but other 241.Tn TLDs 242can be queried by using a similar syntax.) 243.Pp 244The following example demonstrates how to query 245a whois server using a non-standard port, where 246.Dq Li query-data 247is the query to be sent to 248.Dq Li whois.example.com 249on port 250.Dq Li rwhois 251(written numerically as 4321). 252.Pp 253.Dl Ic whois -h whois.example.com -p rwhois query-data 254.Pp 255Some whois servers support complex queries 256with dash-letter options. 257You can use the 258.Fl - 259option to separate 260.Nm 261command options from whois server query options. 262A query containing spaces must be quoted as one 263argument to the 264.Nm 265command. 266The following example asks the RIPE whois server 267to return a brief description of its 268.Dq Li domain 269object type: 270.Pp 271.Dl Ic whois -r -- '-t domain' 272.Sh STANDARDS 273.Rs 274.%A K. Harrenstien 275.%A M. Stahl 276.%A E. Feinler 277.%D October 1985 278.%R RFC 954 279.%T NICNAME/WHOIS 280.Re 281.Pp 282.Rs 283.%A L. Daigle 284.%D September 2004 285.%R RFC 3912 286.%T WHOIS Protocol Specification 287.Re 288.Sh HISTORY 289The 290.Nm 291command appeared in 292.Bx 4.3 . 293