Debian Codegraph @

upstream/fedora-rawhide/man1/updatectl.1

raw
1 '\" t
2 .TH "UPDATECTL" "1" "" "systemd 261~rc2" "updatectl"
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 updatectl \- Control the system update service
24 .SH "SYNOPSIS"
25 .HP \w'\fBupdatectl\fR\ 'u
26 \fBupdatectl\fR [OPTIONS...] {COMMAND} [TARGET...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBupdatectl\fR
30 may be used to check for and install system updates managed by
31 \fBsystemd-sysupdated.service\fR(8)\&.
32 .SH "COMMANDS"
33 .PP
34 The following commands are understood:
35 .PP
36 \fBlist\fR [\fITARGET\fR[@\fIVERSION\fR]]
37 .RS 4
38 Show information about targets and their versions\&.
39 .sp
40 When no
41 \fITARGET\fR
42 is specified, this command lists all available targets\&. When a
43 \fITARGET\fR
44 is specified without a
45 \fIVERSION\fR, this command lists all known versions of the specified target\&. If a
46 \fIVERSION\fR
47 is specified, this command lists all known information about the specific version\&.
48 .sp
49 See the example below for details of the output\&.
50 .sp
51 Added in version 257\&.
52 .RE
53 .PP
54 \fBcheck\fR [\fITARGET\fR\&...]
55 .RS 4
56 Check if any updates are available for the specified targets\&. If no targets are specified, all available targets will be checked for updates\&.
57 .sp
58 See the example below for details of the output\&.
59 .sp
60 Added in version 257\&.
61 .RE
62 .PP
63 \fBupdate\fR [\fITARGET\fR[@\fIVERSION\fR]\&...]
64 .RS 4
65 Update the specified targets to the specified versions\&. If a target is specified without a version, then it will be updated to the latest version\&. If no targets are specified, then all available targets will be updated to the latest version\&.
66 .sp
67 Added in version 257\&.
68 .RE
69 .PP
70 \fBvacuum\fR [\fITARGET\fR\&...]
71 .RS 4
72 Clean up old versions of the specified targets\&. If no targets are specified, all available targets will be vacuumed\&.
73 .sp
74 Added in version 257\&.
75 .RE
76 .PP
77 \fBfeatures\fR [\fIFEATURE\fR]
78 .RS 4
79 When no
80 \fIFEATURE\fR
81 is specified, this command lists all optional features\&. When a
82 \fIFEATURE\fR
83 is specified, this command lists all known information about that feature\&.
84 .sp
85 Added in version 257\&.
86 .RE
87 .PP
88 \fBenable\fR \fIFEATURE\fR\&..., \fBdisable\fR \fIFEATURE\fR\&...
89 .RS 4
90 These commands enable or disable optional features\&. See
91 \fBsysupdate.features\fR(5)\&. These commands always operate on the host system\&.
92 .sp
93 By default, these commands will only change the system\*(Aqs configuration by creating or deleting drop\-in files; they will not immediately download the enabled features, or clean up after the disabled ones\&. Enabled features will be downloaded and installed the next time the target is updated, and disabled transfers will be cleaned up the next time the target is updated or vacuumed\&. Pass
94 \fB\-\-now\fR
95 to immediately apply these changes\&.
96 .sp
97 Added in version 257\&.
98 .RE
99 .PP
100 \fB\-\-no\-ask\-password\fR
101 .RS 4
102 Do not query the user for authentication for privileged operations\&.
103 .RE
104 .PP
105 \fB\-h\fR, \fB\-\-help\fR
106 .RS 4
107 Print a short help text and exit\&.
108 .RE
109 .PP
110 \fB\-\-version\fR
111 .RS 4
112 Print a short version string and exit\&.
113 .RE
114 .SH "OPTIONS"
115 .PP
116 The following commands are understood:
117 .PP
118 \fB\-\-reboot\fR
119 .RS 4
120 When used with the
121 \fBupdate\fR
122 command, reboots the system after updates finish applying\&. If any update fails, the system will not reboot\&.
123 .sp
124 When used with the
125 \fBenable\fR
126 or
127 \fBdisable\fR
128 commands and the
129 \fB\-\-now\fR
130 flag, reboots the system after download or clean\-up finish applying\&.
131 .sp
132 Added in version 257\&.
133 .RE
134 .PP
135 \fB\-\-offline\fR
136 .RS 4
137 When used with the
138 \fBlist\fR
139 command, disables fetching metadata from the network\&. This makes the
140 \fBlist\fR
141 command only return information that is available locally (i\&.e\&. about versions already installed on the system)\&.
142 .sp
143 Added in version 257\&.
144 .RE
145 .PP
146 \fB\-\-now\fR
147 .RS 4
148 When used with the
149 \fBenable\fR
150 command, downloads and installs the enabled features\&. When used with the
151 \fBdisable\fR
152 command, deletes all resources downloaded by the disabled features\&.
153 .sp
154 Added in version 257\&.
155 .RE
156 .PP
157 \fB\-H\fR, \fB\-\-host=\fR
158 .RS 4
159 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
160 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
161 ":", and then a container name, separated by
162 "/", which connects directly to a specific container on the specified host\&. This will use SSH to talk to the remote machine manager instance\&. Container names may be enumerated with
163 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
164 .RE
165 .PP
166 \fB\-\-no\-pager\fR
167 .RS 4
168 Do not pipe output into a pager\&.
169 .RE
170 .PP
171 \fB\-\-no\-legend\fR
172 .RS 4
173 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
174 .RE
175 .SH "EXIT STATUS"
176 .PP
177 On success, 0 is returned, a non\-zero failure code otherwise\&.
178 .SH "ENVIRONMENT"
179 .PP
180 \fI$SYSTEMD_LOG_LEVEL\fR
181 .RS 4
182 The maximum log level of emitted messages (messages with a higher log level, i\&.e\&. less important ones, will be suppressed)\&. Takes a comma\-separated list of values\&. A value may be either one of (in order of decreasing importance)
183 \fBemerg\fR,
184 \fBalert\fR,
185 \fBcrit\fR,
186 \fBerr\fR,
187 \fBwarning\fR,
188 \fBnotice\fR,
189 \fBinfo\fR,
190 \fBdebug\fR, or an integer in the range 0\&...7\&. See
191 \fBsyslog\fR(3)
192 for more information\&. Each value may optionally be prefixed with one of
193 \fBconsole\fR,
194 \fBsyslog\fR,
195 \fBkmsg\fR
196 or
197 \fBjournal\fR
198 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
199 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
200 specifies to log at debug level except when logging to the console which should be at info level)\&. Note that the global maximum log level takes priority over any per target maximum log levels\&.
201 .RE
202 .PP
203 \fI$SYSTEMD_LOG_COLOR\fR
204 .RS 4
205 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
206 .sp
207 This setting is only useful when messages are written directly to the terminal, because
208 \fBjournalctl\fR(1)
209 and other tools that display logs will color messages based on the log level on their own\&.
210 .RE
211 .PP
212 \fI$SYSTEMD_LOG_TIME\fR
213 .RS 4
214 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
215 .sp
216 This setting is only useful when messages are written directly to the terminal or a file, because
217 \fBjournalctl\fR(1)
218 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
219 .RE
220 .PP
221 \fI$SYSTEMD_LOG_LOCATION\fR
222 .RS 4
223 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
224 .sp
225 Note that the log location is often attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
226 .RE
227 .PP
228 \fI$SYSTEMD_LOG_TID\fR
229 .RS 4
230 A boolean\&. If true, messages will be prefixed with the current numerical thread ID (TID)\&.
231 .sp
232 Note that the this information is attached as metadata to journal entries anyway\&. Including it directly in the message text can nevertheless be convenient when debugging programs\&.
233 .RE
234 .PP
235 \fI$SYSTEMD_LOG_TARGET\fR
236 .RS 4
237 The destination for log messages\&. One of
238 \fBconsole\fR
239 (log to the attached tty),
240 \fBconsole\-prefixed\fR
241 (log to the attached tty but with prefixes encoding the log level and "facility", see
242 \fBsyslog\fR(3),
243 \fBkmsg\fR
244 (log to the kernel circular log buffer),
245 \fBjournal\fR
246 (log to the journal),
247 \fBjournal\-or\-kmsg\fR
248 (log to the journal if available, and to kmsg otherwise),
249 \fBauto\fR
250 (determine the appropriate log target automatically, the default),
251 \fBnull\fR
252 (disable log output)\&.
253 .RE
254 .PP
255 \fI$SYSTEMD_LOG_RATELIMIT_KMSG\fR
256 .RS 4
257 Whether to ratelimit kmsg or not\&. Takes a boolean\&. Defaults to
258 "true"\&. If disabled, systemd will not ratelimit messages written to kmsg\&.
259 .RE
260 .PP
261 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
262 .RS 4
263 Pager to use when
264 \fB\-\-no\-pager\fR
265 is not given\&.
266 \fI$SYSTEMD_PAGER\fR
267 is used if set; otherwise
268 \fI$PAGER\fR
269 is used\&. If neither
270 \fI$SYSTEMD_PAGER\fR
271 nor
272 \fI$PAGER\fR
273 are set, a set of well\-known pager implementations is tried in turn, including
274 \fBless\fR(1)
275 and
276 \fBmore\fR(1), until one is found\&. If no pager implementation is discovered, no pager is invoked\&. Setting those environment variables to an empty string or the value
277 "cat"
278 is equivalent to passing
279 \fB\-\-no\-pager\fR\&.
280 .sp
281 Note: if
282 \fI$SYSTEMD_PAGERSECURE\fR
283 is not set,
284 \fI$SYSTEMD_PAGER\fR
285 and
286 \fI$PAGER\fR
287 can only be used to disable the pager (with
288 "cat"
289 or
290 ""), and are otherwise ignored\&.
291 .RE
292 .PP
293 \fI$SYSTEMD_LESS\fR
294 .RS 4
295 Override the options passed to
296 \fBless\fR
297 (by default
298 "FRSXMK")\&.
299 .sp
300 Users might want to change two options in particular:
301 .PP
302 \fBK\fR
303 .RS 4
304 This option instructs the pager to exit immediately when
305 Ctrl+C
306 is pressed\&. To allow
307 \fBless\fR
308 to handle
309 Ctrl+C
310 itself to switch back to the pager command prompt, unset this option\&.
311 .sp
312 If the value of
313 \fI$SYSTEMD_LESS\fR
314 does not include
315 "K", and the pager that is invoked is
316 \fBless\fR,
317 Ctrl+C
318 will be ignored by the executable, and needs to be handled by the pager\&.
319 .RE
320 .PP
321 \fBX\fR
322 .RS 4
323 This option instructs the pager to not send termcap initialization and deinitialization strings to the terminal\&. It is set by default to allow command output to remain visible in the terminal even after the pager exits\&. Nevertheless, this prevents some pager functionality from working, in particular paged output cannot be scrolled with the mouse\&.
324 .RE
325 .sp
326 Note that setting the regular
327 \fI$LESS\fR
328 environment variable has no effect for
329 \fBless\fR
330 invocations by systemd tools\&.
331 .sp
332 See
333 \fBless\fR(1)
334 for more discussion\&.
335 .RE
336 .PP
337 \fI$SYSTEMD_LESSCHARSET\fR
338 .RS 4
339 Override the charset passed to
340 \fBless\fR
341 (by default
342 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
343 .sp
344 Note that setting the regular
345 \fI$LESSCHARSET\fR
346 environment variable has no effect for
347 \fBless\fR
348 invocations by systemd tools\&.
349 .RE
350 .PP
351 \fI$SYSTEMD_PAGERSECURE\fR
352 .RS 4
353 Common pager commands like
354 \fBless\fR(1), in addition to "paging", i\&.e\&. scrolling through the output, support opening of or writing to other files and running arbitrary shell commands\&. When commands are invoked with elevated privileges, for example under
355 \fBsudo\fR(8)
356 or
357 \fBpkexec\fR(1), the pager becomes a security boundary\&. Care must be taken that only programs with strictly limited functionality are used as pagers, and unintended interactive features like opening or creation of new files or starting of subprocesses are not allowed\&. "Secure mode" for the pager may be enabled as described below,
358 \fIif the pager supports that\fR
359 (most pagers are not written in a way that takes this into consideration)\&. It is recommended to either explicitly enable "secure mode" or to completely disable the pager using
360 \fB\-\-no\-pager\fR
361 or
362 \fIPAGER=cat\fR
363 when allowing untrusted users to execute commands with elevated privileges\&.
364 .sp
365 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
366 \fBLESSSECURE=1\fR
367 will be set when invoking the pager, which instructs the pager to disable commands that open or create new files or start new subprocesses\&. Currently only
368 \fBless\fR(1)
369 is known to understand this variable and implement "secure mode"\&.
370 .sp
371 When set to false, no limitation is placed on the pager\&. Setting
372 \fISYSTEMD_PAGERSECURE=0\fR
373 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
374 .sp
375 When
376 \fI$SYSTEMD_PAGERSECURE\fR
377 is not set, systemd tools attempt to automatically figure out if "secure mode" should be enabled and whether the pager supports it\&. "Secure mode" is enabled if the effective UID is not the same as the owner of the login session, see
378 \fBgeteuid\fR(2)
379 and
380 \fBsd_pid_get_owner_uid\fR(3), or when running under
381 \fBsudo\fR(8)
382 or similar tools (\fI$SUDO_UID\fR
383 is set
384 \&\s-2\u[1]\d\s+2)\&. In those cases,
385 \fISYSTEMD_PAGERSECURE=1\fR
386 will be set and pagers which are not known to implement "secure mode" will not be used at all\&. Note that this autodetection only covers the most common mechanisms to elevate privileges and is intended as convenience\&. It is recommended to explicitly set
387 \fI$SYSTEMD_PAGERSECURE\fR
388 or disable the pager\&.
389 .sp
390 Note that if the
391 \fI$SYSTEMD_PAGER\fR
392 or
393 \fI$PAGER\fR
394 variables are to be honoured, other than to disable the pager,
395 \fI$SYSTEMD_PAGERSECURE\fR
396 must be set too\&.
397 .RE
398 .PP
399 \fI$SYSTEMD_COLORS\fR
400 .RS 4
401 Takes a boolean argument, or a special value\&. By default (unset),
402 \fBsystemd\fR
403 and related utilities will use colors in their output if possible\&. If
404 \fI$COLORTERM\fR
405 is set to
406 "truecolor"
407 or
408 "24bit", 24\-bit colors will be enabled, 256 colors otherwise, unless
409 \fI$NO_COLOR\fR
410 or
411 \fI$TERM\fR
412 indicates colors are disabled\&.
413 .PP
414 \fBtrue\fR
415 .RS 4
416 Same as unset, except that
417 \fI$NO_COLOR\fR
418 is ignored\&.
419 .RE
420 .PP
421 \fBfalse\fR
422 .RS 4
423 The output will be monochrome\&.
424 .RE
425 .PP
426 "16", "256", "24bit"
427 .RS 4
428 Always use the base 16 ANSI colors, 256 colors, or 24 bit color, respectively\&.
429 .RE
430 .PP
431 "auto\-16", "auto\-256", "auto\-24bit"
432 .RS 4
433 Use the given quantity of colours, subject to
434 \fI$TERM\fR, and what the console is connected to\&.
435 .RE
436 .RE
437 .PP
438 \fI$SYSTEMD_URLIFY\fR
439 .RS 4
440 The value must be a boolean\&. Controls whether clickable links should be generated in the output for terminal emulators supporting this\&. This can be specified to override the decision that
441 \fBsystemd\fR
442 makes based on
443 \fI$TERM\fR
444 and other conditions\&.
445 .RE
446 .SH "EXAMPLES"
447 .PP
448 Note that these examples are just here for demonstration purposes, and the output of these commands is free to change\&. These commands are intended for display to a user\&. If you\*(Aqd like machine\-readable output, use the
449 \fBorg.freedesktop.sysupdate1\fR(5)
450 D\-Bus API directly\&.
451 .PP
452 \fBExample\ \&1.\ \&Output from list\fR
453 .sp
454 .if n \{\
455 .RS 4
456 .\}
457 .nf
458 $ \fBupdatectl list\fR
459 TARGET VERSION PATH
460 host 48 sysupdate\&.d
461 machine:fedora 38 /var/lib/machines/fedora\&.raw
462 component:shim 15\&.7 sysupdate\&.shim\&.d
463 $ \fBupdatectl list host\fR
464 VERSION STATUS
465 ↻ 50 candidate
466 49 available
467 ● 48 current
468 47 available
469 46 available
470 45 available
471 [\&.\&.\&.]
472 \(mu 25 available+obsolete
473 \(mu 24 available+obsolete
474 \(mu 23 available+obsolete
475 [\&.\&.\&.]
476 $ \fBupdatectl list host@49\fR
477 ↻ Version: 50
478 State: candidate
479 ChangeLog: https://vendor\&.com/os/v50\&.html
480
481 TYPE PATH PTUUID PTFLAGS SHA256
482 url\-file http://dl\&.vendor\&.com/os/uki_50 \- \- 90f6534282dd720f7a222fa781086990dc9c83e5c7499f085970a8e75e3ac349
483 url\-file http://dl\&.vendor\&.com/os/usr_50_981a5b84\-a301\-c819\-f681\-3e575fe16f16 981a5b84\-a301\-c819\-f681\-3e575fe16f16 \- c0596ab1095258ec6f16c7c281a50d71c419a9f587c1ef858cfbbb69fb0a16f3
484 url\-file http://dl\&.vendor\&.com/os/verity_50_2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 \- e1e90a128e038b3a53455e55d1ca717c743aba31fe6b4b4624109df0243c6338
485 url\-file http://dl\&.vendor\&.com/os/verity_sig_50 \- \- ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356
486 .fi
487 .if n \{\
488 .RE
489 .\}
490 .PP
491 \fBExample\ \&2.\ \&Checking for and installing updates\fR
492 .sp
493 .if n \{\
494 .RS 4
495 .\}
496 .nf
497 $ \fBupdatectl check\fR
498 TARGET UPDATE
499 host 48 → 50
500 machine:fedora 38 → 40
501 $ \fBupdatectl update host machine:fedora@39\fR
502 [\&.\&.\&.]
503 ✓ host@50
504 ✓ machine:fedora@39
505 .fi
506 .if n \{\
507 .RE
508 .\}
509 .SH "SEE ALSO"
510 .PP
511 \fBsystemd\fR(1),
512 \fBsystemd-sysupdate\fR(8)
513 \fBsystemd-sysupdated.service\fR(8)
514 \fBsysupdate.d\fR(5),
515 .SH "NOTES"
516 .IP " 1." 4
517 It is recommended for other tools to set and check
518 \fI$SUDO_UID\fR
519 as appropriate, treating it is a common interface.
520