Debian Codegraph @

upstream/debian-unstable/man1/resolvectl.1

raw
1 '\" t
2 .TH "RESOLVECTL" "1" "" "systemd 261~rc3" "resolvectl"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 resolvectl, resolvconf \- Resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services; introspect and reconfigure the DNS resolver
24 .SH "SYNOPSIS"
25 .HP \w'\fBresolvectl\fR\ 'u
26 \fBresolvectl\fR [OPTIONS...] {COMMAND} [NAME...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBresolvectl\fR
30 may be used to resolve domain names, IPv4 and IPv6 addresses, DNS resource records and services with the
31 \fBsystemd-resolved.service\fR(8)
32 resolver service\&. By default, the specified list of parameters will be resolved as hostnames, retrieving their IPv4 and IPv6 addresses\&. If the parameters specified are formatted as IPv4 or IPv6 addresses the reverse operation is done, and a hostname is retrieved for the specified addresses\&.
33 .PP
34 The program\*(Aqs output contains information about the protocol used for the look\-up and on which network interface the data was discovered\&. It also contains information on whether the information could be authenticated\&. All data for which local DNSSEC validation succeeds is considered authenticated\&. Moreover, all data originating from local, trusted sources is also reported authenticated, including resolution of the local host name, the
35 "localhost"
36 hostname or all data from
37 /etc/hosts\&.
38 .SH "COMMANDS"
39 .PP
40 \fBquery\fR \fIHOSTNAME|ADDRESS\fR\&...
41 .RS 4
42 Resolve domain names, as well as IPv4 and IPv6 addresses\&. When used in conjunction with
43 \fB\-\-type=\fR
44 or
45 \fB\-\-class=\fR
46 (see below), resolves low\-level DNS resource records\&.
47 .sp
48 If a single\-label domain name is specified it is searched for according to the configured search domains \(em unless
49 \fB\-\-search=no\fR
50 or
51 \fB\-\-type=\fR/\fB\-\-class=\fR
52 are specified, both of which turn this logic off\&.
53 .sp
54 If an international domain name is specified, it is automatically translated according to IDNA rules when resolved via classic DNS \(em but not for look\-ups via MulticastDNS or LLMNR\&. If
55 \fB\-\-type=\fR/\fB\-\-class=\fR
56 is used IDNA translation is turned off and domain names are processed as specified\&.
57 .sp
58 If combined with
59 \fB\-\-json=\fR
60 (only supported in combination with
61 \fB\-\-type=\fR) will output the resource record data in a JSON object\&.
62 .sp
63 Added in version 239\&.
64 .RE
65 .PP
66 \fBservice\fR [[\fINAME\fR] \fITYPE\fR] \fIDOMAIN\fR
67 .RS 4
68 Resolve
69 \m[blue]\fBRFC 6763 DNS\-SD\fR\m[]\&\s-2\u[1]\d\s+2
70 and
71 \m[blue]\fBRFC 2782 SRV\fR\m[]\&\s-2\u[2]\d\s+2
72 services, depending on the specified list of parameters\&. If three parameters are passed the first is assumed to be the DNS\-SD service name, the second the
73 \fBSRV\fR
74 service type, and the third the domain to search in\&. In this case, a full DNS\-SD style
75 \fBSRV\fR
76 and
77 \fBTXT\fR
78 lookup is executed\&. If only two parameters are specified, the first is assumed to be the
79 \fBSRV\fR
80 service type, and the second the domain to look in\&. In this case, no
81 \fBTXT\fR
82 resource record is requested\&. Finally, if only one parameter is specified, it is assumed to be a domain name, that is already prefixed with an
83 \fBSRV\fR
84 type, and an
85 \fBSRV\fR
86 lookup is done (no
87 \fBTXT\fR)\&.
88 .sp
89 Added in version 239\&.
90 .RE
91 .PP
92 \fBopenpgp\fR \fIEMAIL@DOMAIN\fR\&...
93 .RS 4
94 Query PGP keys stored as
95 \fBOPENPGPKEY\fR
96 resource records, see
97 \m[blue]\fBRFC 7929\fR\m[]\&\s-2\u[3]\d\s+2\&. Specified e\-mail addresses are converted to the corresponding DNS domain name, and any
98 \fBOPENPGPKEY\fR
99 keys are printed\&.
100 .sp
101 Added in version 239\&.
102 .RE
103 .PP
104 \fBtlsa\fR [\fIFAMILY\fR] \fIDOMAIN\fR[:\fIPORT\fR]\&...
105 .RS 4
106 Query TLS public keys stored as
107 \fBTLSA\fR
108 resource records, see
109 \m[blue]\fBRFC 6698\fR\m[]\&\s-2\u[4]\d\s+2\&. A query will be performed for each of the specified names prefixed with the port and family ("_\fIport\fR\&._\fIfamily\fR\&.\fIdomain\fR")\&. The port number may be specified after a colon (":"), otherwise
110 \fB443\fR
111 will be used by default\&. The family may be specified as the first argument, otherwise
112 \fBtcp\fR
113 will be used\&.
114 .sp
115 Added in version 239\&.
116 .RE
117 .PP
118 \fBstatus\fR [\fILINK\fR\&...]
119 .RS 4
120 Shows the global and per\-link DNS settings currently in effect\&. If no command is specified, this is the implied default\&.
121 .sp
122 Added in version 239\&.
123 .RE
124 .PP
125 \fBstatistics\fR
126 .RS 4
127 Shows general resolver statistics, including information whether DNSSEC is enabled and available, as well as resolution and validation statistics\&.
128 .sp
129 Added in version 239\&.
130 .RE
131 .PP
132 \fBreset\-statistics\fR
133 .RS 4
134 Resets the statistics counters shown in
135 \fBstatistics\fR
136 to zero\&. This operation requires root privileges\&.
137 .sp
138 Added in version 239\&.
139 .RE
140 .PP
141 \fBflush\-caches\fR
142 .RS 4
143 Flushes all DNS resource record caches the service maintains locally\&. This is mostly equivalent to sending the
144 \fBSIGUSR2\fR
145 to the
146 \fBsystemd\-resolved\fR
147 service\&.
148 .sp
149 Added in version 239\&.
150 .RE
151 .PP
152 \fBreset\-server\-features\fR
153 .RS 4
154 Flushes all feature level information the resolver learnt about specific servers, and ensures that the server feature probing logic is started from the beginning with the next look\-up request\&. This is mostly equivalent to sending the
155 \fBSIGRTMIN+1\fR
156 to the
157 \fBsystemd\-resolved\fR
158 service\&.
159 .sp
160 Added in version 239\&.
161 .RE
162 .PP
163 \fBdns\fR [\fILINK\fR [\fISERVER\fR\&...]], \fBdomain\fR [\fILINK\fR [\fIDOMAIN\fR\&...]], \fBdefault\-route\fR [\fILINK\fR [\fIBOOL\fR\&...]], \fBllmnr\fR [\fILINK\fR [\fIMODE\fR]], \fBmdns\fR [\fILINK\fR [\fIMODE\fR]], \fBdnssec\fR [\fILINK\fR [\fIMODE\fR]], \fBdnsovertls\fR [\fILINK\fR [\fIMODE\fR]], \fBnta\fR [\fILINK\fR [\fIDOMAIN\fR\&...]]
164 .RS 4
165 Get/set per\-interface DNS configuration\&. These commands may be used to configure various DNS settings for network interfaces\&. These commands may be used to inform
166 \fBsystemd\-resolved\fR
167 or
168 \fBsystemd\-networkd\fR
169 about per\-interface DNS configuration determined through external means\&. The
170 \fBdns\fR
171 command expects IPv4 or IPv6 address specifications of DNS servers to use\&. Each address can optionally take a port number separated with
172 ":", a network interface name or index separated with
173 "%", and a Server Name Indication (SNI) separated with
174 "#"\&. When IPv6 address is specified with a port number, then the address must be in the square brackets\&. That is, the acceptable full formats are
175 "111\&.222\&.333\&.444:9953%ifname#example\&.com"
176 for IPv4 and
177 "[1111:2222::3333]:9953%ifname#example\&.com"
178 for IPv6\&. The
179 \fBdomain\fR
180 command expects valid DNS domains, possibly prefixed with
181 "~", and configures a per\-interface search or route\-only domain\&. The
182 \fBdefault\-route\fR
183 command expects a boolean parameter, and configures whether the link may be used as default route for DNS lookups, i\&.e\&. if it is suitable for lookups on domains no other link explicitly is configured for\&. The
184 \fBllmnr\fR,
185 \fBmdns\fR,
186 \fBdnssec\fR
187 and
188 \fBdnsovertls\fR
189 commands may be used to configure the per\-interface LLMNR, MulticastDNS, DNSSEC and DNSOverTLS settings\&. Finally,
190 \fBnta\fR
191 command may be used to configure additional per\-interface DNSSEC NTA domains\&.
192 .sp
193 Commands
194 \fBdns\fR,
195 \fBdomain\fR
196 and
197 \fBnta\fR
198 can take a single empty string argument to clear their respective value lists\&.
199 .sp
200 For details about these settings, their possible values and their effect, see the corresponding settings in
201 \fBsystemd.network\fR(5)\&.
202 .sp
203 Added in version 239\&.
204 .RE
205 .PP
206 \fBrevert \fR\fB\fILINK\fR\fR
207 .RS 4
208 Revert the per\-interface DNS configuration\&. If the DNS configuration is reverted all per\-interface DNS setting are reset to their defaults, undoing all effects of
209 \fBdns\fR,
210 \fBdomain\fR,
211 \fBdefault\-route\fR,
212 \fBllmnr\fR,
213 \fBmdns\fR,
214 \fBdnssec\fR,
215 \fBdnsovertls\fR,
216 \fBnta\fR\&. Note that when a network interface disappears all configuration is lost automatically, an explicit reverting is not necessary in that case\&.
217 .sp
218 Added in version 239\&.
219 .RE
220 .PP
221 \fBmonitor\fR
222 .RS 4
223 Show a continuous stream of local client resolution queries and their responses\&. Whenever a local query is completed the query\*(Aqs DNS resource lookup key and resource records are shown\&. Note that this displays queries issued locally only, and does not immediately relate to DNS requests submitted to configured DNS servers or the LLMNR or MulticastDNS zones, as lookups may be answered from the local cache, or might result in multiple DNS transactions (for example to validate DNSSEC information)\&. If CNAME/CNAME redirection chains are followed, a separate query will be displayed for each element of the chain\&. Use
224 \fB\-\-json=\fR
225 to enable JSON output\&.
226 .sp
227 Added in version 252\&.
228 .RE
229 .PP
230 \fBshow\-cache\fR
231 .RS 4
232 Show current cache content, per scope\&. Use
233 \fB\-\-json=\fR
234 to enable JSON output\&.
235 .sp
236 Added in version 254\&.
237 .RE
238 .PP
239 \fBshow\-server\-state\fR
240 .RS 4
241 Show detailed server state information, per DNS Server\&. Use
242 \fB\-\-json=\fR
243 to enable JSON output\&.
244 .sp
245 Added in version 255\&.
246 .RE
247 .PP
248 \fBlog\-level\fR [\fILEVEL\fR]
249 .RS 4
250 If no argument is given, print the current log level of the manager\&. If an optional argument
251 \fILEVEL\fR
252 is provided, then the command changes the current log level of the manager to
253 \fILEVEL\fR
254 (accepts the same values as
255 \fB\-\-log\-level=\fR
256 described in
257 \fBsystemd\fR(1))\&.
258 .sp
259 Added in version 244\&.
260 .RE
261 .SH "OPTIONS"
262 .PP
263 \fB\-4\fR, \fB\-6\fR
264 .RS 4
265 By default, when resolving a hostname, both IPv4 and IPv6 addresses are acquired\&. By specifying
266 \fB\-4\fR
267 only IPv4 addresses are requested, by specifying
268 \fB\-6\fR
269 only IPv6 addresses are requested\&.
270 .sp
271 Added in version 239\&.
272 .RE
273 .PP
274 \fB\-i\fR \fIINTERFACE\fR, \fB\-\-interface=\fR\fB\fIINTERFACE\fR\fR
275 .RS 4
276 Specifies the network interface to execute the query on\&. This may either be specified as numeric interface index or as network interface string (e\&.g\&.
277 "en0")\&. Note that this option has no effect if system\-wide DNS configuration (as configured in
278 /etc/resolv\&.conf
279 or
280 /etc/systemd/resolved\&.conf) in place of per\-link configuration is used\&.
281 .sp
282 Added in version 239\&.
283 .RE
284 .PP
285 \fB\-p\fR \fIPROTOCOL\fR, \fB\-\-protocol=\fR\fB\fIPROTOCOL\fR\fR
286 .RS 4
287 Specifies the network protocol for the query\&. May be one of
288 "dns"
289 (i\&.e\&. classic unicast DNS),
290 "llmnr"
291 (\m[blue]\fBLink\-Local Multicast Name Resolution\fR\m[]\&\s-2\u[5]\d\s+2),
292 "llmnr\-ipv4",
293 "llmnr\-ipv6"
294 (LLMNR via the indicated underlying IP protocols),
295 "mdns"
296 (\m[blue]\fBMulticast DNS\fR\m[]\&\s-2\u[6]\d\s+2),
297 "mdns\-ipv4",
298 "mdns\-ipv6"
299 (MDNS via the indicated underlying IP protocols)\&. By default, the lookup is done via all protocols suitable for the lookup\&. If used, limits the set of protocols that may be used\&. Use this option multiple times to enable resolving via multiple protocols at the same time\&. The setting
300 "llmnr"
301 is identical to specifying this switch once with
302 "llmnr\-ipv4"
303 and once via
304 "llmnr\-ipv6"\&. Note that this option does not force the service to resolve the operation with the specified protocol, as that might require a suitable network interface and configuration\&. The special value
305 "help"
306 may be used to list known values\&.
307 .sp
308 Added in version 239\&.
309 .RE
310 .PP
311 \fB\-t\fR \fITYPE\fR, \fB\-\-type=\fR\fB\fITYPE\fR\fR, \fB\-c\fR \fICLASS\fR, \fB\-\-class=\fR\fB\fICLASS\fR\fR
312 .RS 4
313 When used in conjunction with the
314 \fBquery\fR
315 command, specifies the DNS resource record type (e\&.g\&.
316 \fBA\fR,
317 \fBAAAA\fR,
318 \fBMX\fR, \&...) and class (e\&.g\&.
319 \fBIN\fR,
320 \fBANY\fR, \&...) to look up\&. If these options are used a DNS resource record set matching the specified class and type is requested\&. The class defaults to
321 \fBIN\fR
322 if only a type is specified\&. The special value
323 "help"
324 may be used to list known values\&.
325 .sp
326 Without these options
327 \fBresolvectl query\fR
328 provides high\-level domain name to address and address to domain name resolution\&. With these options it provides low\-level DNS resource record resolution\&. The search domain logic is automatically turned off when these options are used, i\&.e\&. specified domain names need to be fully qualified domain names\&. Moreover, IDNA internal domain name translation is turned off as well, i\&.e\&. international domain names should be specified in
329 "xn\-\-\&..."
330 notation, unless look\-up in MulticastDNS/LLMNR is desired, in which case UTF\-8 characters should be used\&.
331 .sp
332 Added in version 239\&.
333 .RE
334 .PP
335 \fB\-\-service\-address=\fR\fB\fIBOOL\fR\fR
336 .RS 4
337 Takes a boolean parameter\&. If true (the default), when doing a service lookup with
338 \fB\-\-service\fR
339 the hostnames contained in the
340 \fBSRV\fR
341 resource records are resolved as well\&.
342 .sp
343 Added in version 239\&.
344 .RE
345 .PP
346 \fB\-\-service\-txt=\fR\fB\fIBOOL\fR\fR
347 .RS 4
348 Takes a boolean parameter\&. If true (the default), when doing a DNS\-SD service lookup with
349 \fB\-\-service\fR
350 the
351 \fBTXT\fR
352 service metadata record is resolved as well\&.
353 .sp
354 Added in version 239\&.
355 .RE
356 .PP
357 \fB\-\-cname=\fR\fB\fIBOOL\fR\fR
358 .RS 4
359 Takes a boolean parameter\&. If true (the default), DNS
360 \fBCNAME\fR
361 or
362 \fBDNAME\fR
363 redirections are followed\&. Otherwise, if a CNAME or DNAME record is encountered while resolving, an error is returned\&.
364 .sp
365 Added in version 239\&.
366 .RE
367 .PP
368 \fB\-\-validate=\fR\fB\fIBOOL\fR\fR
369 .RS 4
370 Takes a boolean parameter; used in conjunction with
371 \fBquery\fR\&. If true (the default), DNSSEC validation is applied as usual \(em under the condition that it is enabled for the network and for
372 systemd\-resolved\&.service
373 as a whole\&. If false, DNSSEC validation is disabled for the specific query, regardless of whether it is enabled for the network or in the service\&. Note that setting this option to true does not force DNSSEC validation on systems/networks where DNSSEC is turned off\&. This option is only suitable to turn off such validation where otherwise enabled, not enable validation where otherwise disabled\&.
374 .sp
375 Added in version 248\&.
376 .RE
377 .PP
378 \fB\-\-synthesize=\fR\fB\fIBOOL\fR\fR
379 .RS 4
380 Takes a boolean parameter; used in conjunction with
381 \fBquery\fR\&. If true (the default), select domains are resolved on the local system, among them
382 "localhost",
383 "_gateway",
384 "_outbound",
385 "_localdnsstub"
386 and
387 "_localdnsproxy"
388 or entries from
389 /etc/hosts\&. If false these domains are not resolved locally, and either fail (in case of
390 "localhost",
391 "_gateway"
392 or
393 "_outbound"
394 and suchlike) or go to the network via regular DNS/mDNS/LLMNR lookups (in case of
395 /etc/hosts
396 entries)\&.
397 .sp
398 Added in version 248\&.
399 .RE
400 .PP
401 \fB\-\-cache=\fR\fB\fIBOOL\fR\fR
402 .RS 4
403 Takes a boolean parameter; used in conjunction with
404 \fBquery\fR\&. If true (the default), lookups use the local DNS resource record cache\&. If false, lookups are routed to the network instead, regardless of whether already available in the local cache\&.
405 .sp
406 Added in version 248\&.
407 .RE
408 .PP
409 \fB\-\-zone=\fR\fB\fIBOOL\fR\fR
410 .RS 4
411 Takes a boolean parameter; used in conjunction with
412 \fBquery\fR\&. If true (the default), lookups are answered from locally registered LLMNR or mDNS resource records, if defined\&. If false, locally registered LLMNR/mDNS records are not considered for the lookup request\&.
413 .sp
414 Added in version 248\&.
415 .RE
416 .PP
417 \fB\-\-trust\-anchor=\fR\fB\fIBOOL\fR\fR
418 .RS 4
419 Takes a boolean parameter; used in conjunction with
420 \fBquery\fR\&. If true (the default), lookups for DS and DNSKEY are answered from the local DNSSEC trust anchors if possible\&. If false, the local trust store is not considered for the lookup request\&.
421 .sp
422 Added in version 248\&.
423 .RE
424 .PP
425 \fB\-\-network=\fR\fB\fIBOOL\fR\fR
426 .RS 4
427 Takes a boolean parameter; used in conjunction with
428 \fBquery\fR\&. If true (the default), lookups are answered via DNS, LLMNR or mDNS network requests if they cannot be synthesized locally, or be answered from the local cache, zone or trust anchors (see above)\&. If false, the request is not answered from the network and will thus fail if none of the indicated sources can answer them\&.
429 .sp
430 Added in version 248\&.
431 .RE
432 .PP
433 \fB\-\-search=\fR\fB\fIBOOL\fR\fR
434 .RS 4
435 Takes a boolean parameter\&. If true (the default), any specified single\-label hostnames will be searched in the domains configured in the search domain list, if it is non\-empty\&. Otherwise, the search domain logic is disabled\&. Note that this option has no effect if
436 \fB\-\-type=\fR
437 is used (see above), in which case the search domain logic is unconditionally turned off\&.
438 .sp
439 Added in version 239\&.
440 .RE
441 .PP
442 \fB\-\-raw\fR[=payload|packet]
443 .RS 4
444 Dump the answer records as binary data\&. If there is no argument or if the argument is
445 "payload", the payload of the resource record data is exported, i\&.e\&. not the whole "RDATA", but just primary contents\&. If the argument is
446 "packet", the whole resource record is dumped in wire format, prefixed by length specified as a little\-endian 64\-bit integer\&. This format allows multiple record to be dumped and unambiguously parsed\&.
447 .sp
448 Note that
449 "payload"
450 is only supported for a small subset of resource record types: SSHFP, TLSA, OPENPGPKEY where this dumps the key material only; and A, AAAA where this dumps the address data\&.
451 .sp
452 Added in version 239\&.
453 .RE
454 .PP
455 \fB\-\-legend=\fR\fB\fIBOOL\fR\fR
456 .RS 4
457 Takes a boolean parameter\&. If true (the default), column headers and meta information about the query response are shown\&. Otherwise, this output is suppressed\&.
458 .sp
459 Added in version 239\&.
460 .RE
461 .PP
462 \fB\-\-stale\-data=\fR\fB\fIBOOL\fR\fR
463 .RS 4
464 Takes a boolean parameter; used in conjunction with
465 \fBquery\fR\&. If true (the default), lookups are answered with stale data (expired resource records) if possible\&. If false, the stale data is not considered for the lookup request\&.
466 .sp
467 Added in version 254\&.
468 .RE
469 .PP
470 \fB\-\-relax\-single\-label=\fR\fB\fIBOOL\fR\fR
471 .RS 4
472 Takes a boolean parameter; used in conjunction with
473 \fBquery\fR\&. If true, rules regarding routing of single\-label names are relaxed\&. Defaults to false\&. By default, lookups of single\-label names are assumed to refer to local hosts to be resolved via local resolution such as LLMNR or via search domain qualification and are not routed to upstream servers as is\&. If this option is enabled these rules are disabled and the queries are routed upstream anyway\&. Also see the
474 \fIResolveUnicastSingleLabel=\fR
475 option in
476 \fBresolved.conf\fR(5)
477 which provides a system\-wide option that controls this behaviour\&.
478 .sp
479 Added in version 256\&.
480 .RE
481 .PP
482 \fB\-\-no\-ask\-password\fR
483 .RS 4
484 Do not query the user for authentication for privileged operations\&.
485 .RE
486 .PP
487 \fB\-\-json=\fR\fB\fIMODE\fR\fR
488 .RS 4
489 Shows output formatted as JSON\&. Expects one of
490 "short"
491 (for the shortest possible output without any redundant whitespace or line breaks),
492 "pretty"
493 (for a pretty version of the same, with indentation and line breaks) or
494 "off"
495 (to turn off JSON output, the default)\&.
496 .RE
497 .PP
498 \fB\-j\fR
499 .RS 4
500 Equivalent to
501 \fB\-\-json=pretty\fR
502 if running on a terminal, and
503 \fB\-\-json=short\fR
504 otherwise\&.
505 .RE
506 .PP
507 \fB\-\-no\-pager\fR
508 .RS 4
509 Do not pipe output into a pager\&.
510 .RE
511 .PP
512 \fB\-h\fR, \fB\-\-help\fR
513 .RS 4
514 Print a short help text and exit\&.
515 .RE
516 .PP
517 \fB\-\-version\fR
518 .RS 4
519 Print a short version string and exit\&.
520 .RE
521 .SH "COMPATIBILITY WITH RESOLVCONF(8)"
522 .PP
523 \fBresolvectl\fR
524 is a multi\-call binary\&. When invoked as
525 "resolvconf"
526 (generally achieved by means of a symbolic link of this name to the
527 \fBresolvectl\fR
528 binary) it is run in a limited
529 \fBresolvconf\fR(8)
530 compatibility mode\&. It accepts mostly the same arguments and pushes all data into
531 \fBsystemd-resolved.service\fR(8), similar to how
532 \fBdns\fR
533 and
534 \fBdomain\fR
535 commands operate\&. Note that
536 \fBsystemd\-resolved\&.service\fR
537 is the only supported backend, which is different from other implementations of this command\&.
538 .PP
539 /etc/resolv\&.conf
540 will only be updated with servers added with this command when
541 /etc/resolv\&.conf
542 is a symlink to
543 /run/systemd/resolve/resolv\&.conf, and not a static file\&. See the discussion of
544 /etc/resolv\&.conf
545 handling in
546 \fBsystemd-resolved.service\fR(8)\&.
547 .PP
548 Not all operations supported by other implementations are supported natively\&. Specifically:
549 .PP
550 \fB\-a\fR
551 .RS 4
552 Registers per\-interface DNS configuration data with
553 \fBsystemd\-resolved\fR\&. Expects a network interface name as only command line argument\&. Reads
554 \fBresolv.conf\fR(5)\-compatible DNS configuration data from its standard input\&. Relevant fields are
555 "nameserver"
556 and
557 "domain"/"search"\&. This command is mostly identical to invoking
558 \fBresolvectl\fR
559 with a combination of
560 \fBdns\fR
561 and
562 \fBdomain\fR
563 commands\&.
564 .sp
565 Added in version 239\&.
566 .RE
567 .PP
568 \fB\-d\fR
569 .RS 4
570 Unregisters per\-interface DNS configuration data with
571 \fBsystemd\-resolved\fR\&. This command is mostly identical to invoking
572 \fBresolvectl revert\fR\&.
573 .sp
574 Added in version 239\&.
575 .RE
576 .PP
577 \fB\-f\fR
578 .RS 4
579 When specified
580 \fB\-a\fR
581 and
582 \fB\-d\fR
583 will not complain about missing network interfaces and will silently execute no operation in that case\&.
584 .sp
585 Added in version 239\&.
586 .RE
587 .PP
588 \fB\-x\fR
589 .RS 4
590 This switch for "exclusive" operation is supported only partially\&. It is mapped to an additional configured search domain of
591 "~\&."
592 \(em i\&.e\&. ensures that DNS traffic is preferably routed to the DNS servers on this interface, unless there are other, more specific domains configured on other interfaces\&.
593 .sp
594 Added in version 239\&.
595 .RE
596 .PP
597 \fB\-p\fR
598 .RS 4
599 When specified, the interface will not be used as the default route\&. See also
600 \fBsystemd-resolved.service\fR(8)
601 about the default route\&.
602 .sp
603 Added in version 257\&.
604 .RE
605 .PP
606 \fB\-m\fR
607 .RS 4
608 The switch is not supported and is silently ignored\&.
609 .sp
610 Added in version 239\&.
611 .RE
612 .PP
613 \fB\-u\fR, \fB\-I\fR, \fB\-i\fR, \fB\-l\fR, \fB\-R\fR, \fB\-r\fR, \fB\-v\fR, \fB\-V\fR, \fB\-\-enable\-updates\fR, \fB\-\-disable\-updates\fR, \fB\-\-are\-updates\-enabled\fR
614 .RS 4
615 These switches are not supported and the command will fail if used\&.
616 .sp
617 Added in version 239\&.
618 .RE
619 .PP
620 See
621 \fBresolvconf\fR(8)
622 for details on those command line options\&.
623 .SH "EXAMPLES"
624 .PP
625 \fBExample\ \&1.\ \&Retrieve the addresses of the "www\&.0pointer\&.net" domain (A and AAAA resource records)\fR
626 .sp
627 .if n \{\
628 .RS 4
629 .\}
630 .nf
631 $ resolvectl query www\&.0pointer\&.net
632 www\&.0pointer\&.net: 2a01:238:43ed:c300:10c3:bcf3:3266:da74
633 85\&.214\&.157\&.71
634
635 \-\- Information acquired via protocol DNS in 611\&.6ms\&.
636 \-\- Data is authenticated: no
637 .fi
638 .if n \{\
639 .RE
640 .\}
641 .PP
642 \fBExample\ \&2.\ \&Retrieve the domain of the "85\&.214\&.157\&.71" IP address (PTR resource record)\fR
643 .sp
644 .if n \{\
645 .RS 4
646 .\}
647 .nf
648 $ resolvectl query 85\&.214\&.157\&.71
649 85\&.214\&.157\&.71: gardel\&.0pointer\&.net
650
651 \-\- Information acquired via protocol DNS in 1\&.2997s\&.
652 \-\- Data is authenticated: no
653 .fi
654 .if n \{\
655 .RE
656 .\}
657 .PP
658 \fBExample\ \&3.\ \&Retrieve the MX record of the "yahoo\&.com" domain\fR
659 .sp
660 .if n \{\
661 .RS 4
662 .\}
663 .nf
664 $ resolvectl \-\-legend=no \-t MX query yahoo\&.com
665 yahoo\&.com\&. IN MX 1 mta7\&.am0\&.yahoodns\&.net
666 yahoo\&.com\&. IN MX 1 mta6\&.am0\&.yahoodns\&.net
667 yahoo\&.com\&. IN MX 1 mta5\&.am0\&.yahoodns\&.net
668 .fi
669 .if n \{\
670 .RE
671 .\}
672 .PP
673 \fBExample\ \&4.\ \&Resolve an SRV service\fR
674 .sp
675 .if n \{\
676 .RS 4
677 .\}
678 .nf
679 $ resolvectl service _xmpp\-server\&._tcp gmail\&.com
680 _xmpp\-server\&._tcp/gmail\&.com: alt1\&.xmpp\-server\&.l\&.google\&.com:5269 [priority=20, weight=0]
681 173\&.194\&.210\&.125
682 alt4\&.xmpp\-server\&.l\&.google\&.com:5269 [priority=20, weight=0]
683 173\&.194\&.65\&.125
684 \&...
685 .fi
686 .if n \{\
687 .RE
688 .\}
689 .PP
690 \fBExample\ \&5.\ \&Retrieve a PGP key (OPENPGP resource record)\fR
691 .sp
692 .if n \{\
693 .RS 4
694 .\}
695 .nf
696 $ resolvectl openpgp zbyszek@fedoraproject\&.org
697 d08ee310438ca124a6149ea5cc21b6313b390dce485576eff96f8722\&._openpgpkey\&.fedoraproject\&.org\&. IN OPENPGPKEY
698 mQINBFBHPMsBEACeInGYJCb+7TurKfb6wGyTottCDtiSJB310i37/6ZYoeIay/5soJjlMyf
699 MFQ9T2XNT/0LM6gTa0MpC1st9LnzYTMsT6tzRly1D1UbVI6xw0g0vE5y2Cjk3xUwAynCsSs
700 \&...
701 .fi
702 .if n \{\
703 .RE
704 .\}
705 .PP
706 \fBExample\ \&6.\ \&Retrieve a TLS key (TLSA resource record)\fR
707 .sp
708 .if n \{\
709 .RS 4
710 .\}
711 .nf
712 $ resolvectl tlsa tcp fedoraproject\&.org:443
713 _443\&._tcp\&.fedoraproject\&.org IN TLSA 0 0 1 19400be5b7a31fb733917700789d2f0a2471c0c9d506c0e504c06c16d7cb17c0
714 \-\- Cert\&. usage: CA constraint
715 \-\- Selector: Full Certificate
716 \-\- Matching type: SHA\-256
717 .fi
718 .if n \{\
719 .RE
720 .\}
721 .PP
722 "tcp"
723 and
724 ":443"
725 are optional and could be skipped\&.
726 .SH "SEE ALSO"
727 .PP
728 \fBsystemd\fR(1), \fBsystemd-resolved.service\fR(8), \fBsystemd.dnssd\fR(5), \fBsystemd-networkd.service\fR(8), \fBresolvconf\fR(8)
729 .SH "NOTES"
730 .IP " 1." 4
731 RFC 6763 DNS-SD
732 .RS 4
733 \%https://tools.ietf.org/html/rfc6763
734 .RE
735 .IP " 2." 4
736 RFC 2782 SRV
737 .RS 4
738 \%https://tools.ietf.org/html/rfc2782
739 .RE
740 .IP " 3." 4
741 RFC 7929
742 .RS 4
743 \%https://tools.ietf.org/html/rfc7929
744 .RE
745 .IP " 4." 4
746 RFC 6698
747 .RS 4
748 \%https://tools.ietf.org/html/rfc6698
749 .RE
750 .IP " 5." 4
751 Link-Local Multicast Name Resolution
752 .RS 4
753 \%https://tools.ietf.org/html/rfc4795
754 .RE
755 .IP " 6." 4
756 Multicast DNS
757 .RS 4
758 \%https://www.ietf.org/rfc/rfc6762.txt
759 .RE