OS Manuals

/usr/bin/resolvectl

The systemd System and Service Manager

From systemd 262.2-r1 (os), captured 2026-11-05 by running resolvectl --help (exit 0). permalink

> resolvectl [OPTION…] COMMAND …

Send control commands to the network name resolution manager, or resolve domain
names, IPv4 and IPv6 addresses, DNS records, and services.

Commands:
  query HOSTNAME|ADDRESS…      Resolve domain names, IPv4 and IPv6 addresses
  service [[NAME] TYPE] DOMAIN Resolve service (SRV)
  openpgp EMAIL@DOMAIN…        Query OpenPGP public key
  tlsa DOMAIN[:PORT]…          Query TLS public key
  [status [LINK…]]             Show link and server status
  statistics                   Show resolver statistics
  reset-statistics             Reset resolver statistics
  flush-caches                 Flush all local DNS caches
  reset-server-features        Forget learnt DNS server feature levels
  monitor                      Monitor DNS queries
  show-cache                   Show cache contents
  show-server-state            Show servers state
  dns [LINK [SERVER…]]         Get/set per-interface DNS server address
  domain [LINK [DOMAIN…]]      Get/set per-interface search domain
  default-route [LINK [BOOL]]  Get/set per-interface default route flag
  llmnr [LINK [MODE]]          Get/set per-interface LLMNR mode
  mdns [LINK [MODE]]           Get/set per-interface MulticastDNS mode
  dnsovertls [LINK [MODE]]     Get/set per-interface DNS-over-TLS mode
  dnssec [LINK [MODE]]         Get/set per-interface DNSSEC mode
  nta [LINK [DOMAIN…]]         Get/set per-interface DNSSEC NTA
  revert LINK                  Revert per-interface configuration
  log-level [LEVEL]            Get/set logging threshold for systemd-resolved

Options:
  -h --help                    Show this help
     --version                 Show package version
  -4                           Resolve IPv4 addresses
  -6                           Resolve IPv6 addresses
  -i --interface=INTERFACE     Look on interface
  -p --protocol=PROTO|help     Look via protocol
  -t --type=TYPE|help          Query RR with DNS type
  -c --class=CLASS|help        Query RR with DNS class
     --service-address=BOOL    Resolve address for services (default: yes)
     --service-txt=BOOL        Resolve TXT records for services (default: yes)
     --cname=BOOL              Follow CNAME redirects (default: yes)
     --validate=BOOL           Allow DNSSEC validation (default: yes)
     --synthesize=BOOL         Allow synthetic response (default: yes)
     --cache=BOOL              Allow response from cache (default: yes)
     --stale-data=BOOL         Allow response from cache with stale data (default: yes)
     --relax-single-label=BOOL Allow single label lookups to go upstream (default: no)
     --zone=BOOL               Allow response from locally registered mDNS/LLMNR records (default:
                               yes)
     --trust-anchor=BOOL       Allow response from local trust anchor (default: yes)
     --network=BOOL            Allow response from network (default: yes)
     --search=BOOL             Use search domains for single-label names (default: yes)
     --raw[=payload|packet]    Dump the answer as binary data
     --no-pager                Do not start a pager
     --no-ask-password         Do not prompt for password
     --legend=BOOL             Print headers and additional info (default: yes)
     --json=FORMAT             Generate JSON output (pretty, short, or off)
  -j                           Equivalent to --json=pretty (on TTY) or --json=short (otherwise)

See the resolvectl(1) man page for details.
Options (25)
OptionDescriptionSource
-h --helpShow this helphelp
--versionShow package versionhelp
-4Resolve IPv4 addresseshelp
-6Resolve IPv6 addresseshelp
-i --interface=INTERFACELook on interfacehelp
-p --protocol=PROTO|helpLook via protocolhelp
-t --type=TYPE|helpQuery RR with DNS typehelp
-c --class=CLASS|helpQuery RR with DNS classhelp
--service-address BOOLResolve address for services (default: yes)help
--service-txt BOOLResolve TXT records for services (default: yes)help
--cname BOOLFollow CNAME redirects (default: yes)help
--validate BOOLAllow DNSSEC validation (default: yes)help
--synthesize BOOLAllow synthetic response (default: yes)help
--cache BOOLAllow response from cache (default: yes)help
--stale-data BOOLAllow response from cache with stale data (default: yes)help
--zone BOOLAllow response from locally registered mDNS/LLMNR records (default: yes)help
--trust-anchor BOOLAllow response from local trust anchor (default: yes)help
--network BOOLAllow response from network (default: yes)help
--search BOOLUse search domains for single-label names (default: yes)help
--raw payload|packetDump the answer as binary datahelp
--no-pagerDo not start a pagerhelp
--no-ask-passwordDo not prompt for passwordhelp
--legend BOOLPrint headers and additional info (default: yes)help
--json FORMATGenerate JSON output (pretty, short, or off)help
-jEquivalent to --json=pretty (on TTY) or --json=short (otherwise)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.