1KHOST(1) Knot DNS KHOST(1)
2
3
4
6 khost - Simple DNS lookup utility
7
9 khost [options] name [server]
10
12 This utility sends a DNS query for the name to the server and prints a
13 reply in more user-readable form. For more advanced DNS queries use
14 kdig instead.
15
16 Parameters
17 name Is a domain name that is to be looked up. If the name is IPv4 or
18 IPv6 address the PTR query type is used.
19
20 server Is a name or an address of the nameserver to send a query to.
21 The address can be specified using [address]:port notation. If
22 no server is specified, the servers from /etc/resolv.conf are
23 used.
24
25 If no arguments are provided, khost prints a short help.
26
27 Options
28 -4 Use the IPv4 protocol only.
29
30 -6 Use the IPv6 protocol only.
31
32 -a Send ANY query with verbose mode.
33
34 -d Enable debug messages.
35
36 -h, --help
37 Print the program help.
38
39 -r Disable recursion.
40
41 -T Use the TCP protocol.
42
43 -v Enable verbose output.
44
45 -V, --version
46 Print the program version.
47
48 -w Wait forever for the reply.
49
50 -c class
51 Set the query class (e.g. CH, CLASS4). The default class is IN.
52
53 -t type
54 Set the query type (e.g. NS, IXFR=12345, TYPE65535). The default
55 is to send 3 queries (A, AAAA and MX).
56
57 -R retries
58 The number (>=0) of UDP retries to query a nameserver. The de‐
59 fault is 1.
60
61 -W wait
62 The time to wait for a reply in seconds. This timeout applies to
63 each query try. The default is 2 seconds.
64
66 Exit status of 0 means successful operation. Any other exit status in‐
67 dicates an error.
68
70 1. Get the A, AAAA and MX records for example.com:
71
72 $ khost example.com
73
74 2. Get the reverse record for address 192.0.2.1:
75
76 $ khost 192.0.2.1
77
78 3. Perform a verbose zone transfer for zone example.com:
79
80 $ khost -t AXFR -v example.com
81
83 /etc/resolv.conf
84
86 kdig(1), knsupdate(1).
87
89 CZ.NIC Labs <https://www.knot-dns.cz>
90
92 Copyright 2010–2022, CZ.NIC, z.s.p.o.
93
94
95
96
973.2.4 2022-12-12 KHOST(1)