tldr/pages/linux/resolvectl.md

34 lines
867 B
Markdown
Raw Normal View History

2021-12-05 20:30:39 +00:00
# resolvectl
> Resolve domain names, IPv4 and IPv6 addresses, DNS resource records, and services.
2021-12-05 20:30:39 +00:00
> Introspect and reconfigure the DNS resolver.
> More information: <https://www.freedesktop.org/software/systemd/man/resolvectl.html>.
- Show DNS settings:
`resolvectl status`
- Resolve the IPv4 and IPv6 addresses for one or more domains:
`resolvectl query {{domain1 domain2 ...}}`
- Retrieve the domain of a specified IP address:
2021-12-05 20:30:39 +00:00
`resolvectl query {{ip_address}}`
- Retrieve an MX record of a domain:
2021-12-05 20:30:39 +00:00
`resolvectl --legend={{no}} --type={{MX}} query {{domain}}`
- Resolve an SRV record, for example _xmpp-server._tcp gmail.com:
`resolvectl service _{{service}}._{{protocol}} {{name}}`
- Retrieve the public key from an email address from an OPENPGPKEY DNS record:
`resolvectl openpgp {{email}}`
2021-12-05 20:30:39 +00:00
2022-07-11 01:05:01 +01:00
- Retrieve a TLS key:
2021-12-05 20:30:39 +00:00
`resolvectl tlsa tcp {{domain}}:443`