1.. highlight:: console 2 3khost – Simple DNS lookup utility 4================================= 5 6Synopsis 7-------- 8 9:program:`khost` [*options*] *name* [*server*] 10 11Description 12----------- 13 14This utility sends a DNS query for the *name* to the *server* and prints a reply 15in more user-readable form. For more advanced DNS queries use :doc:`kdig<man_kdig>` 16instead. 17 18Parameters 19.......... 20 21*name* 22 Is a domain name that is to be looked up. If the *name* is IPv4 or IPv6 23 address the PTR query type is used. 24 25*server* 26 Is a name or an address of the nameserver to send a query to. The address 27 can be specified using [address]:port notation. If no server is specified, 28 the servers from :file:`/etc/resolv.conf` are used. 29 30If no arguments are provided, :program:`khost` prints a short help. 31 32Options 33....... 34 35**-4** 36 Use the IPv4 protocol only. 37 38**-6** 39 Use the IPv6 protocol only. 40 41**-a** 42 Send ANY query with verbose mode. 43 44**-d** 45 Enable debug messages. 46 47**-h**, **--help** 48 Print the program help. 49 50**-r** 51 Disable recursion. 52 53**-T** 54 Use the TCP protocol. 55 56**-v** 57 Enable verbose output. 58 59**-V**, **--version** 60 Print the program version. 61 62**-w** 63 Wait forever for the reply. 64 65**-c** *class* 66 Set the query class (e.g. CH, CLASS4). The default class is IN. 67 68**-t** *type* 69 Set the query type (e.g. NS, IXFR=12345, TYPE65535). The default is to send 3 70 queries (A, AAAA and MX). 71 72**-R** *retries* 73 The number (>=0) of UDP retries to query a nameserver. The default is 1. 74 75**-W** *wait* 76 The time to wait for a reply in seconds. This timeout applies to each query 77 try. The default is 2 seconds. 78 79Exit values 80----------- 81 82Exit status of 0 means successful operation. Any other exit status indicates 83an error. 84 85Examples 86-------- 87 881. Get the A, AAAA and MX records for example.com:: 89 90 $ khost example.com 91 922. Get the reverse record for address 192.0.2.1:: 93 94 $ khost 192.0.2.1 95 963. Perform a verbose zone transfer for zone example.com:: 97 98 $ khost -t AXFR -v example.com 99 100Files 101----- 102 103:file:`/etc/resolv.conf` 104 105See Also 106-------- 107 108:manpage:`kdig(1)`, :manpage:`knsupdate(1)`. 109