ADNSHOST(1)

🌸 ADNSHOST πŸ’–

okay bestie, so this is adnshost β€” it's the Asynchronous-capable DNS client utilities, living in the User Commands section of the manual. it's giving "one binary, so many vibes" and honestly? we're obsessed. let's get into it πŸ¦‹


✨ DESCRIPTION ✨

the sacred usage incantation, no cap:

usage: adnshost [global-opts] [query-opts] query-domain

       [[query-opts] query-domain ...]

       adnshost [global-opts] [query-opts] -f|--pipe

so you either pile queries onto the command line, or you pipe them in. main character energy either way πŸ’…

🌈 global binary options (the on/off girlies)

  • +e, --no-env β€” do NOT look at environment variables. at all. none. we're ignoring them entirely, periodt.
  • -f, --pipe β€” read queries from stdin instead of from the args. pipeline slay.
  • -a, --asynch β€” let the answers get reordered. chaos permitted, but the good kind ✨

πŸŽ€ answer/error output format and destination (details further down, iykyk)

  • -Fs, --fmt-simple β€” answers go to stdout, errors show up as messages on stderr. this is the default ✨
  • -Fi, --fmt-inline β€” answers AND errors both go to stdout, in a parseable format. tidy πŸ’–
  • -Fa, --fmt-asynch β€” fully-parseable output format. this is the default when you use --asynch πŸ‘‘

πŸ”Š global verbosity level

  • -Vq, --quiet β€” print literally nothing to stderr. silence is golden πŸ’€
  • -Vn, --no-quiet β€” only report unexpected kinds of problem. this is the default.
  • -Vd, --debug β€” debugging mode, we're going full detective πŸ”
  • --no-checkc β€” skip the for-developer consistency checks
  • --checkc β€” actually DO the for-developer consistency checks
  • --checkc-freq β€” do those for-developer consistency checks very often

πŸ’œ other global options

  • --config <<config-text>> β€” config to use instead of /etc/resolv.conf
  • --version β€” print the version number
  • --help β€” print usage information

πŸ¦‹ per-query options

  • -t<type> / --type <type> β€” which query type (list is down below bestie)
  • -i<addr> / --ptr <addr> β€” do a reverse query (address β†’ name lookup)
  • --reverse <addr> <zone> β€” lookup in an in-addr-like zone (eg MAPS RBL)

🌸 per-query binary options

  • -s, --search β€” use the search list
  • -Qq, --qc-query β€” let query domains contain quote-requiring chars
  • -Qa, --qc-anshost β€” let hostnames in answers contain ...
  • +Qc, --no-qc-cname β€” prevent CNAME target domains from containing ...
  • -u, --tcp β€” force the use of a virtual circuit
  • +Do, --no-show-owner β€” don't display the owner name in output
  • +Dt, --no-show-type β€” don't display the RR type in output
  • +Dc, --no-show-cname β€” don't display the CNAME target in output

⏳ per-query TTL mode

NB: the TTL here is the minimum across all the info in the reply 🫢
  • -Tt, --ttl-ttl β€” show the TTL as a TTL
  • -Ta, --ttl-abs β€” show the TTL as a time_t for when the data might expire
  • -Tn, --no-ttl β€” don't show the TTL. this is the default.

🧚 per-query address family options (for addr and friends)

  • -A4, ----addr-ipv4-only β€” only return IPv4 addresses
  • -A6, ----addr-ipv6-only β€” only return IPv6 addresses
  • -Aa, ----addr-all β€” return all available addresses. this is the default.
  • -Am, ----addr-ipv6-mapped β€” return IPv4 addresses as IPv6-mapped

πŸ”₯ per-query CNAME handling mode

  • -Cf, --cname-reject β€” call it an error if a CNAME is found
  • -Cl, --cname-loose β€” allow references to CNAMEs in other RRs
  • -Cs, --cname-ok β€” CNAME is fine for the query domain, but not in RRs. this is the default.

⭐ asynchronous/pipe mode options

  • --asynch-id <id> β€” set the <id>; by default it's a decimal sequence starting at 0
  • --cancel-id <id> β€” cancel the query with id <id> (no error if it's not found, she's chill like that)

πŸ’… escaping domains which might start with -

  • - <domain> β€” the next argument is a domain, but more options may still follow

Query domains should always be quoted according to master file format. no shortcuts bestie πŸ™ˆ

For binary options, --FOO and --no-FOO are opposites, and so are -X and +X. In each case the default is the one that isn't listed. Per-query options stay set a particular way until they're reset β€” whether they appear on the command line or on stdin. And all global options must preceed the first query domain.

With -f, the input should be lines with either an option β€” possibly with a value argument, separated from the option by a space if it's a long option β€” or a domain, possibly preceded by a hyphen and a space to distinguish it from an option. πŸŽ€


🌈 output format

Output format is master file format without class or TTL by default:

[<owner>] [<ttl>] [<type>] <data>

or, if the <owner> domain refers to a CNAME and --show-cname is on:

[<owner>] [<ttl>] CNAME <cname> [<cname>] [<ttl>] <type> <data>

When a query fails you get an error message to stderr (with --fmt-simple). Specify --fmt-inline for lines like this (broken up here for readability, she's long):

; failed <statustype> <statusnum> <statusabbrev> \

[<owner>] [<ttl>] [<cname>] "<status string>"

If you use --fmt-asynch, which is the default for --asynch, each answer β€” success or failure β€” is preceded by a line:

<id> <nrrs> <statustype> <statusnum> <statusabbrev> \

[<owner>] [<ttl>] [<cname>] "<status string>"

where <nrrs> is the number of RRs that follow, and <cname> will be $ or the CNAME target. the CNAME indirection and error formats above are not used in this mode. πŸ’œ


🫢 exit status

  • 0 β€” all went well ✨
  • 1-6 β€” at least one query failed with statustype:
  1. 1 β€” localfail β€” temporary errors
  2. 2 β€” remotefail β€” temporary errors
  3. 3 β€” tempfail β€” temporary errors
  4. 4 β€” misconfig β€” permanent errors
  5. 5 β€” misquery β€” permanent errors
  6. 6 β€” permfail β€” permanent errors
  • 10 β€” system trouble
  • 11 β€” usage problems

πŸ‘‘ query types (see adns.h; default is addr)

  • ns soa ptr mx rp srv addr β€” the enhanced versions 🌟
  • cname hinfo txt β€” types with only one version
  • a aaaa ns- soa- ptr- mx- rp- srv- β€” the _raw versions
  • type<number> β€” the unknown type, RFC3597

Default is addr, or ptr for -i/--ptr queries. πŸ“Œ


Copyright Ian Jackson and contributors 🌸

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. fr fr, protect yourself bestie.


okay that's the whole thing, you ate πŸ’… this was GNU adns 1.6.2, dated May 2026 β€” go forth and resolve some names, queen πŸ‘‘πŸ¦‹βœ¨

πŸ“¦ where this page comes from