KHOST(1)

✨ NAME ✨

okay bestie, meet khost β€” the simple DNS lookup utility from Knot DNS (manual name KHOST(1), and yes we're getting into it πŸ’…). It's the cute little lookup tool that keeps things readable, fr fr.

πŸ¦‹ SYNOPSIS πŸ¦‹

khost [options] name [server]

πŸ’– DESCRIPTION πŸ’–

So khost sends a DNS query for name to server and prints the reply in a more user-readable form. It's giving simple and readable energy. For more advanced DNS queries use kdig instead. No cap.

Parameters πŸŽ€

  • name β€” a domain name that is to be looked up. If name is an IPv4 or IPv6 address, the PTR query type is used. Reverse vibes ✨
  • server β€” a name or an address of the nameserver to send a query to. The address can be specified using [address]:port notation. If no server is specified, the servers from /etc/resolv.conf are used. Periodt.

If no arguments are provided, khost prints a short help. Cute of it 🫢

Options πŸ’…

  • -4 β€” Use the IPv4 protocol only.
  • -6 β€” Use the IPv6 protocol only.
  • -a β€” Send ANY query with verbose mode.
  • -d β€” Enable debug messages.
  • -h, --help β€” Print the program help.
  • -r β€” Disable recursion.
  • -T β€” Use the TCP protocol.
  • -v β€” Enable verbose output.
  • -V, --version β€” Print the program version. The option -VV makes the program print the compile time configuration summary.
  • -w β€” Wait forever for the reply.
  • -c class β€” Set the query class (e.g. CH, CLASS4). The default class is IN.
  • -t type β€” Set the query type (e.g. NS, IXFR=12345, TYPE65535). The default is to send 3 queries (A, AAAA and MX).
  • -R retries β€” The number (>=0) of UDP retries to query a nameserver. The default is 1.
  • -W wait β€” The time to wait for a reply in seconds. This timeout applies to each query try. The default is 2 seconds.

⭐ EXIT VALUES ⭐

Exit status of 0 means successful operation. Any other exit status indicates an error. So if it's not 0, something's up bestie 😭.

🌈 EXAMPLES 🌈

  1. Get the A, AAAA and MX records for example.com:
$ khost example.com
  1. Get the reverse record for address 192.0.2.1:
$ khost 192.0.2.1
  1. Perform a verbose zone transfer for zone example.com:
$ khost -t AXFR -v example.com

πŸ“ FILES πŸ“

  • /etc/resolv.conf

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

the icons behind this: CZ.NIC, z.s.p.o. and contributors <https://www.knot-dns.cz/>

Copyright (C) CZ.NIC, z.s.p.o. and contributors


okay that's the whole KHOST(1) page, bestie β€” version 3.6.2, dated 2026-10-21, from the Knot DNS manual. mwah πŸ’‹πŸ’–