Debian Codegraph @

upstream/fedora-44/man1/updatectl.1

raw
1 '\" t
2 .TH "UPDATECTL" "1" "" "systemd 259.5" "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\-h\fR, \fB\-\-help\fR
101 .RS 4
102 Print a short help text and exit\&.
103 .RE
104 .PP
105 \fB\-\-version\fR
106 .RS 4
107 Print a short version string and exit\&.
108 .RE
109 .SH "OPTIONS"
110 .PP
111 The following commands are understood:
112 .PP
113 \fB\-\-reboot\fR
114 .RS 4
115 When used with the
116 \fBupdate\fR
117 command, reboots the system after updates finish applying\&. If any update fails, the system will not reboot\&.
118 .sp
119 When used with the
120 \fBenable\fR
121 or
122 \fBdisable\fR
123 commands and the
124 \fB\-\-now\fR
125 flag, reboots the system after download or clean\-up finish applying\&.
126 .sp
127 Added in version 257\&.
128 .RE
129 .PP
130 \fB\-\-offline\fR
131 .RS 4
132 When used with the
133 \fBlist\fR
134 command, disables fetching metadata from the network\&. This makes the
135 \fBlist\fR
136 command only return information that is available locally (i\&.e\&. about versions already installed on the system)\&.
137 .sp
138 Added in version 257\&.
139 .RE
140 .PP
141 \fB\-\-now\fR
142 .RS 4
143 When used with the
144 \fBenable\fR
145 command, downloads and installs the enabled features\&. When used with the
146 \fBdisable\fR
147 command, deletes all resources downloaded by the disabled features\&.
148 .sp
149 Added in version 257\&.
150 .RE
151 .PP
152 \fB\-H\fR, \fB\-\-host=\fR
153 .RS 4
154 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
155 "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by
156 ":", and then a container name, separated by
157 "/", 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
158 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&.
159 .RE
160 .PP
161 \fB\-\-no\-pager\fR
162 .RS 4
163 Do not pipe output into a pager\&.
164 .RE
165 .PP
166 \fB\-\-no\-legend\fR
167 .RS 4
168 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
169 .RE
170 .SH "EXIT STATUS"
171 .PP
172 On success, 0 is returned, a non\-zero failure code otherwise\&.
173 .SH "ENVIRONMENT"
174 .PP
175 \fI$SYSTEMD_LOG_LEVEL\fR
176 .RS 4
177 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)
178 \fBemerg\fR,
179 \fBalert\fR,
180 \fBcrit\fR,
181 \fBerr\fR,
182 \fBwarning\fR,
183 \fBnotice\fR,
184 \fBinfo\fR,
185 \fBdebug\fR, or an integer in the range 0\&...7\&. See
186 \fBsyslog\fR(3)
187 for more information\&. Each value may optionally be prefixed with one of
188 \fBconsole\fR,
189 \fBsyslog\fR,
190 \fBkmsg\fR
191 or
192 \fBjournal\fR
193 followed by a colon to set the maximum log level for that specific log target (e\&.g\&.
194 \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR
195 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\&.
196 .RE
197 .PP
198 \fI$SYSTEMD_LOG_COLOR\fR
199 .RS 4
200 A boolean\&. If true, messages written to the tty will be colored according to priority\&.
201 .sp
202 This setting is only useful when messages are written directly to the terminal, because
203 \fBjournalctl\fR(1)
204 and other tools that display logs will color messages based on the log level on their own\&.
205 .RE
206 .PP
207 \fI$SYSTEMD_LOG_TIME\fR
208 .RS 4
209 A boolean\&. If true, console log messages will be prefixed with a timestamp\&.
210 .sp
211 This setting is only useful when messages are written directly to the terminal or a file, because
212 \fBjournalctl\fR(1)
213 and other tools that display logs will attach timestamps based on the entry metadata on their own\&.
214 .RE
215 .PP
216 \fI$SYSTEMD_LOG_LOCATION\fR
217 .RS 4
218 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&.
219 .sp
220 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\&.
221 .RE
222 .PP
223 \fI$SYSTEMD_LOG_TID\fR
224 .RS 4
225 A boolean\&. If true, messages will be prefixed with the current numerical thread ID (TID)\&.
226 .sp
227 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\&.
228 .RE
229 .PP
230 \fI$SYSTEMD_LOG_TARGET\fR
231 .RS 4
232 The destination for log messages\&. One of
233 \fBconsole\fR
234 (log to the attached tty),
235 \fBconsole\-prefixed\fR
236 (log to the attached tty but with prefixes encoding the log level and "facility", see
237 \fBsyslog\fR(3),
238 \fBkmsg\fR
239 (log to the kernel circular log buffer),
240 \fBjournal\fR
241 (log to the journal),
242 \fBjournal\-or\-kmsg\fR
243 (log to the journal if available, and to kmsg otherwise),
244 \fBauto\fR
245 (determine the appropriate log target automatically, the default),
246 \fBnull\fR
247 (disable log output)\&.
248 .RE
249 .PP
250 \fI$SYSTEMD_LOG_RATELIMIT_KMSG\fR
251 .RS 4
252 Whether to ratelimit kmsg or not\&. Takes a boolean\&. Defaults to
253 "true"\&. If disabled, systemd will not ratelimit messages written to kmsg\&.
254 .RE
255 .PP
256 \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR
257 .RS 4
258 Pager to use when
259 \fB\-\-no\-pager\fR
260 is not given\&.
261 \fI$SYSTEMD_PAGER\fR
262 is used if set; otherwise
263 \fI$PAGER\fR
264 is used\&. If neither
265 \fI$SYSTEMD_PAGER\fR
266 nor
267 \fI$PAGER\fR
268 are set, a set of well\-known pager implementations is tried in turn, including
269 \fBless\fR(1)
270 and
271 \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
272 "cat"
273 is equivalent to passing
274 \fB\-\-no\-pager\fR\&.
275 .sp
276 Note: if
277 \fI$SYSTEMD_PAGERSECURE\fR
278 is not set,
279 \fI$SYSTEMD_PAGER\fR
280 and
281 \fI$PAGER\fR
282 can only be used to disable the pager (with
283 "cat"
284 or
285 ""), and are otherwise ignored\&.
286 .RE
287 .PP
288 \fI$SYSTEMD_LESS\fR
289 .RS 4
290 Override the options passed to
291 \fBless\fR
292 (by default
293 "FRSXMK")\&.
294 .sp
295 Users might want to change two options in particular:
296 .PP
297 \fBK\fR
298 .RS 4
299 This option instructs the pager to exit immediately when
300 Ctrl+C
301 is pressed\&. To allow
302 \fBless\fR
303 to handle
304 Ctrl+C
305 itself to switch back to the pager command prompt, unset this option\&.
306 .sp
307 If the value of
308 \fI$SYSTEMD_LESS\fR
309 does not include
310 "K", and the pager that is invoked is
311 \fBless\fR,
312 Ctrl+C
313 will be ignored by the executable, and needs to be handled by the pager\&.
314 .RE
315 .PP
316 \fBX\fR
317 .RS 4
318 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\&.
319 .RE
320 .sp
321 Note that setting the regular
322 \fI$LESS\fR
323 environment variable has no effect for
324 \fBless\fR
325 invocations by systemd tools\&.
326 .sp
327 See
328 \fBless\fR(1)
329 for more discussion\&.
330 .RE
331 .PP
332 \fI$SYSTEMD_LESSCHARSET\fR
333 .RS 4
334 Override the charset passed to
335 \fBless\fR
336 (by default
337 "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&.
338 .sp
339 Note that setting the regular
340 \fI$LESSCHARSET\fR
341 environment variable has no effect for
342 \fBless\fR
343 invocations by systemd tools\&.
344 .RE
345 .PP
346 \fI$SYSTEMD_PAGERSECURE\fR
347 .RS 4
348 Common pager commands like
349 \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
350 \fBsudo\fR(8)
351 or
352 \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,
353 \fIif the pager supports that\fR
354 (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
355 \fB\-\-no\-pager\fR
356 or
357 \fIPAGER=cat\fR
358 when allowing untrusted users to execute commands with elevated privileges\&.
359 .sp
360 This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode",
361 \fBLESSSECURE=1\fR
362 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
363 \fBless\fR(1)
364 is known to understand this variable and implement "secure mode"\&.
365 .sp
366 When set to false, no limitation is placed on the pager\&. Setting
367 \fISYSTEMD_PAGERSECURE=0\fR
368 or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&.
369 .sp
370 When
371 \fI$SYSTEMD_PAGERSECURE\fR
372 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
373 \fBgeteuid\fR(2)
374 and
375 \fBsd_pid_get_owner_uid\fR(3), or when running under
376 \fBsudo\fR(8)
377 or similar tools (\fI$SUDO_UID\fR
378 is set
379 \&\s-2\u[1]\d\s+2)\&. In those cases,
380 \fISYSTEMD_PAGERSECURE=1\fR
381 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
382 \fI$SYSTEMD_PAGERSECURE\fR
383 or disable the pager\&.
384 .sp
385 Note that if the
386 \fI$SYSTEMD_PAGER\fR
387 or
388 \fI$PAGER\fR
389 variables are to be honoured, other than to disable the pager,
390 \fI$SYSTEMD_PAGERSECURE\fR
391 must be set too\&.
392 .RE
393 .PP
394 \fI$SYSTEMD_COLORS\fR
395 .RS 4
396 Takes a boolean argument\&. When true,
397 \fBsystemd\fR
398 and related utilities will use colors in their output, otherwise the output will be monochrome\&. Additionally, the variable can take one of the following special values:
399 "16",
400 "256"
401 to restrict the use of colors to the base 16 or 256 ANSI colors, respectively\&. This can be specified to override the automatic decision based on
402 \fI$TERM\fR
403 and what the console is connected to\&.
404 .RE
405 .PP
406 \fI$SYSTEMD_URLIFY\fR
407 .RS 4
408 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
409 \fBsystemd\fR
410 makes based on
411 \fI$TERM\fR
412 and other conditions\&.
413 .RE
414 .SH "EXAMPLES"
415 .PP
416 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
417 \fBorg.freedesktop.sysupdate1\fR(5)
418 D\-Bus API directly\&.
419 .PP
420 \fBExample\ \&1.\ \&Output from list\fR
421 .sp
422 .if n \{\
423 .RS 4
424 .\}
425 .nf
426 $ \fBupdatectl list\fR
427 TARGET VERSION PATH
428 host 48 sysupdate\&.d
429 machine:fedora 38 /var/lib/machines/fedora\&.raw
430 component:shim 15\&.7 sysupdate\&.shim\&.d
431 $ \fBupdatectl list host\fR
432 VERSION STATUS
433 ↻ 50 candidate
434 49 available
435 ● 48 current
436 47 available
437 46 available
438 45 available
439 [\&.\&.\&.]
440 \(mu 25 available+obsolete
441 \(mu 24 available+obsolete
442 \(mu 23 available+obsolete
443 [\&.\&.\&.]
444 $ \fBupdatectl list host@49\fR
445 ↻ Version: 50
446 State: candidate
447 ChangeLog: https://vendor\&.com/os/v50\&.html
448
449 TYPE PATH PTUUID PTFLAGS SHA256
450 url\-file http://dl\&.vendor\&.com/os/uki_50 \- \- 90f6534282dd720f7a222fa781086990dc9c83e5c7499f085970a8e75e3ac349
451 url\-file http://dl\&.vendor\&.com/os/usr_50_981a5b84\-a301\-c819\-f681\-3e575fe16f16 981a5b84\-a301\-c819\-f681\-3e575fe16f16 \- c0596ab1095258ec6f16c7c281a50d71c419a9f587c1ef858cfbbb69fb0a16f3
452 url\-file http://dl\&.vendor\&.com/os/verity_50_2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 \- e1e90a128e038b3a53455e55d1ca717c743aba31fe6b4b4624109df0243c6338
453 url\-file http://dl\&.vendor\&.com/os/verity_sig_50 \- \- ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356
454 .fi
455 .if n \{\
456 .RE
457 .\}
458 .PP
459 \fBExample\ \&2.\ \&Checking for and installing updates\fR
460 .sp
461 .if n \{\
462 .RS 4
463 .\}
464 .nf
465 $ \fBupdatectl check\fR
466 TARGET UPDATE
467 host 48 → 50
468 machine:fedora 38 → 40
469 $ \fBupdatectl update host machine:fedora@39\fR
470 [\&.\&.\&.]
471 ✓ host@50
472 ✓ machine:fedora@39
473 .fi
474 .if n \{\
475 .RE
476 .\}
477 .SH "SEE ALSO"
478 .PP
479 \fBsystemd\fR(1),
480 \fBsystemd-sysupdate\fR(8)
481 \fBsystemd-sysupdated.service\fR(8)
482 \fBsysupdate.d\fR(5),
483 .SH "NOTES"
484 .IP " 1." 4
485 It is recommended for other tools to set and check
486 \fI$SUDO_UID\fR
487 as appropriate, treating it is a common interface.
488