'\" t .TH "UPDATECTL" "1" "" "systemd 259.1" "updatectl" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" updatectl \- Control the system update service .SH "SYNOPSIS" .HP \w'\fBupdatectl\fR\ 'u \fBupdatectl\fR [OPTIONS...] {COMMAND} [TARGET...] .SH "DESCRIPTION" .PP \fBupdatectl\fR may be used to check for and install system updates managed by \fBsystemd-sysupdated.service\fR(8)\&. .SH "COMMANDS" .PP The following commands are understood: .PP \fBlist\fR [\fITARGET\fR[@\fIVERSION\fR]] .RS 4 Show information about targets and their versions\&. .sp When no \fITARGET\fR is specified, this command lists all available targets\&. When a \fITARGET\fR is specified without a \fIVERSION\fR, this command lists all known versions of the specified target\&. If a \fIVERSION\fR is specified, this command lists all known information about the specific version\&. .sp See the example below for details of the output\&. .sp Added in version 257\&. .RE .PP \fBcheck\fR [\fITARGET\fR\&...] .RS 4 Check if any updates are available for the specified targets\&. If no targets are specified, all available targets will be checked for updates\&. .sp See the example below for details of the output\&. .sp Added in version 257\&. .RE .PP \fBupdate\fR [\fITARGET\fR[@\fIVERSION\fR]\&...] .RS 4 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\&. .sp Added in version 257\&. .RE .PP \fBvacuum\fR [\fITARGET\fR\&...] .RS 4 Clean up old versions of the specified targets\&. If no targets are specified, all available targets will be vacuumed\&. .sp Added in version 257\&. .RE .PP \fBfeatures\fR [\fIFEATURE\fR] .RS 4 When no \fIFEATURE\fR is specified, this command lists all optional features\&. When a \fIFEATURE\fR is specified, this command lists all known information about that feature\&. .sp Added in version 257\&. .RE .PP \fBenable\fR \fIFEATURE\fR\&..., \fBdisable\fR \fIFEATURE\fR\&... .RS 4 These commands enable or disable optional features\&. See \fBsysupdate.features\fR(5)\&. These commands always operate on the host system\&. .sp 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 \fB\-\-now\fR to immediately apply these changes\&. .sp Added in version 257\&. .RE .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Print a short help text and exit\&. .RE .PP \fB\-\-version\fR .RS 4 Print a short version string and exit\&. .RE .SH "OPTIONS" .PP The following commands are understood: .PP \fB\-\-reboot\fR .RS 4 When used with the \fBupdate\fR command, reboots the system after updates finish applying\&. If any update fails, the system will not reboot\&. .sp When used with the \fBenable\fR or \fBdisable\fR commands and the \fB\-\-now\fR flag, reboots the system after download or clean\-up finish applying\&. .sp Added in version 257\&. .RE .PP \fB\-\-offline\fR .RS 4 When used with the \fBlist\fR command, disables fetching metadata from the network\&. This makes the \fBlist\fR command only return information that is available locally (i\&.e\&. about versions already installed on the system)\&. .sp Added in version 257\&. .RE .PP \fB\-\-now\fR .RS 4 When used with the \fBenable\fR command, downloads and installs the enabled features\&. When used with the \fBdisable\fR command, deletes all resources downloaded by the disabled features\&. .sp Added in version 257\&. .RE .PP \fB\-H\fR, \fB\-\-host=\fR .RS 4 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by "@", to connect to\&. The hostname may optionally be suffixed by a port ssh is listening on, separated by ":", and then a container name, separated by "/", 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 \fBmachinectl \-H \fR\fB\fIHOST\fR\fR\&. Put IPv6 addresses in brackets\&. .RE .PP \fB\-\-no\-pager\fR .RS 4 Do not pipe output into a pager\&. .RE .PP \fB\-\-no\-legend\fR .RS 4 Do not print the legend, i\&.e\&. column headers and the footer with hints\&. .RE .SH "EXIT STATUS" .PP On success, 0 is returned, a non\-zero failure code otherwise\&. .SH "ENVIRONMENT" .PP \fI$SYSTEMD_LOG_LEVEL\fR .RS 4 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) \fBemerg\fR, \fBalert\fR, \fBcrit\fR, \fBerr\fR, \fBwarning\fR, \fBnotice\fR, \fBinfo\fR, \fBdebug\fR, or an integer in the range 0\&...7\&. See \fBsyslog\fR(3) for more information\&. Each value may optionally be prefixed with one of \fBconsole\fR, \fBsyslog\fR, \fBkmsg\fR or \fBjournal\fR followed by a colon to set the maximum log level for that specific log target (e\&.g\&. \fBSYSTEMD_LOG_LEVEL=debug,console:info\fR 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\&. .RE .PP \fI$SYSTEMD_LOG_COLOR\fR .RS 4 A boolean\&. If true, messages written to the tty will be colored according to priority\&. .sp This setting is only useful when messages are written directly to the terminal, because \fBjournalctl\fR(1) and other tools that display logs will color messages based on the log level on their own\&. .RE .PP \fI$SYSTEMD_LOG_TIME\fR .RS 4 A boolean\&. If true, console log messages will be prefixed with a timestamp\&. .sp This setting is only useful when messages are written directly to the terminal or a file, because \fBjournalctl\fR(1) and other tools that display logs will attach timestamps based on the entry metadata on their own\&. .RE .PP \fI$SYSTEMD_LOG_LOCATION\fR .RS 4 A boolean\&. If true, messages will be prefixed with a filename and line number in the source code where the message originates\&. .sp 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\&. .RE .PP \fI$SYSTEMD_LOG_TID\fR .RS 4 A boolean\&. If true, messages will be prefixed with the current numerical thread ID (TID)\&. .sp 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\&. .RE .PP \fI$SYSTEMD_LOG_TARGET\fR .RS 4 The destination for log messages\&. One of \fBconsole\fR (log to the attached tty), \fBconsole\-prefixed\fR (log to the attached tty but with prefixes encoding the log level and "facility", see \fBsyslog\fR(3), \fBkmsg\fR (log to the kernel circular log buffer), \fBjournal\fR (log to the journal), \fBjournal\-or\-kmsg\fR (log to the journal if available, and to kmsg otherwise), \fBauto\fR (determine the appropriate log target automatically, the default), \fBnull\fR (disable log output)\&. .RE .PP \fI$SYSTEMD_LOG_RATELIMIT_KMSG\fR .RS 4 Whether to ratelimit kmsg or not\&. Takes a boolean\&. Defaults to "true"\&. If disabled, systemd will not ratelimit messages written to kmsg\&. .RE .PP \fI$SYSTEMD_PAGER\fR, \fI$PAGER\fR .RS 4 Pager to use when \fB\-\-no\-pager\fR is not given\&. \fI$SYSTEMD_PAGER\fR is used if set; otherwise \fI$PAGER\fR is used\&. If neither \fI$SYSTEMD_PAGER\fR nor \fI$PAGER\fR are set, a set of well\-known pager implementations is tried in turn, including \fBless\fR(1) and \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 "cat" is equivalent to passing \fB\-\-no\-pager\fR\&. .sp Note: if \fI$SYSTEMD_PAGERSECURE\fR is not set, \fI$SYSTEMD_PAGER\fR and \fI$PAGER\fR can only be used to disable the pager (with "cat" or ""), and are otherwise ignored\&. .RE .PP \fI$SYSTEMD_LESS\fR .RS 4 Override the options passed to \fBless\fR (by default "FRSXMK")\&. .sp Users might want to change two options in particular: .PP \fBK\fR .RS 4 This option instructs the pager to exit immediately when Ctrl+C is pressed\&. To allow \fBless\fR to handle Ctrl+C itself to switch back to the pager command prompt, unset this option\&. .sp If the value of \fI$SYSTEMD_LESS\fR does not include "K", and the pager that is invoked is \fBless\fR, Ctrl+C will be ignored by the executable, and needs to be handled by the pager\&. .RE .PP \fBX\fR .RS 4 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\&. .RE .sp Note that setting the regular \fI$LESS\fR environment variable has no effect for \fBless\fR invocations by systemd tools\&. .sp See \fBless\fR(1) for more discussion\&. .RE .PP \fI$SYSTEMD_LESSCHARSET\fR .RS 4 Override the charset passed to \fBless\fR (by default "utf\-8", if the invoking terminal is determined to be UTF\-8 compatible)\&. .sp Note that setting the regular \fI$LESSCHARSET\fR environment variable has no effect for \fBless\fR invocations by systemd tools\&. .RE .PP \fI$SYSTEMD_PAGERSECURE\fR .RS 4 Common pager commands like \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 \fBsudo\fR(8) or \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, \fIif the pager supports that\fR (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 \fB\-\-no\-pager\fR or \fIPAGER=cat\fR when allowing untrusted users to execute commands with elevated privileges\&. .sp This option takes a boolean argument\&. When set to true, the "secure mode" of the pager is enabled\&. In "secure mode", \fBLESSSECURE=1\fR 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 \fBless\fR(1) is known to understand this variable and implement "secure mode"\&. .sp When set to false, no limitation is placed on the pager\&. Setting \fISYSTEMD_PAGERSECURE=0\fR or not removing it from the inherited environment may allow the user to invoke arbitrary commands\&. .sp When \fI$SYSTEMD_PAGERSECURE\fR 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 \fBgeteuid\fR(2) and \fBsd_pid_get_owner_uid\fR(3), or when running under \fBsudo\fR(8) or similar tools (\fI$SUDO_UID\fR is set \&\s-2\u[1]\d\s+2)\&. In those cases, \fISYSTEMD_PAGERSECURE=1\fR 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 \fI$SYSTEMD_PAGERSECURE\fR or disable the pager\&. .sp Note that if the \fI$SYSTEMD_PAGER\fR or \fI$PAGER\fR variables are to be honoured, other than to disable the pager, \fI$SYSTEMD_PAGERSECURE\fR must be set too\&. .RE .PP \fI$SYSTEMD_COLORS\fR .RS 4 Takes a boolean argument\&. When true, \fBsystemd\fR 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: "16", "256" 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 \fI$TERM\fR and what the console is connected to\&. .RE .PP \fI$SYSTEMD_URLIFY\fR .RS 4 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 \fBsystemd\fR makes based on \fI$TERM\fR and other conditions\&. .RE .SH "EXAMPLES" .PP 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 \fBorg.freedesktop.sysupdate1\fR(5) D\-Bus API directly\&. .PP \fBExample\ \&1.\ \&Output from list\fR .sp .if n \{\ .RS 4 .\} .nf $ \fBupdatectl list\fR TARGET VERSION PATH host 48 sysupdate\&.d machine:fedora 38 /var/lib/machines/fedora\&.raw component:shim 15\&.7 sysupdate\&.shim\&.d $ \fBupdatectl list host\fR VERSION STATUS ↻ 50 candidate 49 available ● 48 current 47 available 46 available 45 available [\&.\&.\&.] \(mu 25 available+obsolete \(mu 24 available+obsolete \(mu 23 available+obsolete [\&.\&.\&.] $ \fBupdatectl list host@49\fR ↻ Version: 50 State: candidate ChangeLog: https://vendor\&.com/os/v50\&.html TYPE PATH PTUUID PTFLAGS SHA256 url\-file http://dl\&.vendor\&.com/os/uki_50 \- \- 90f6534282dd720f7a222fa781086990dc9c83e5c7499f085970a8e75e3ac349 url\-file http://dl\&.vendor\&.com/os/usr_50_981a5b84\-a301\-c819\-f681\-3e575fe16f16 981a5b84\-a301\-c819\-f681\-3e575fe16f16 \- c0596ab1095258ec6f16c7c281a50d71c419a9f587c1ef858cfbbb69fb0a16f3 url\-file http://dl\&.vendor\&.com/os/verity_50_2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 2f8d0f3b\-f80a\-6ddc\-a556\-3722bfbb5b79 \- e1e90a128e038b3a53455e55d1ca717c743aba31fe6b4b4624109df0243c6338 url\-file http://dl\&.vendor\&.com/os/verity_sig_50 \- \- ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356 .fi .if n \{\ .RE .\} .PP \fBExample\ \&2.\ \&Checking for and installing updates\fR .sp .if n \{\ .RS 4 .\} .nf $ \fBupdatectl check\fR TARGET UPDATE host 48 → 50 machine:fedora 38 → 40 $ \fBupdatectl update host machine:fedora@39\fR [\&.\&.\&.] ✓ host@50 ✓ machine:fedora@39 .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \fBsystemd\fR(1), \fBsystemd-sysupdate\fR(8) \fBsystemd-sysupdated.service\fR(8) \fBsysupdate.d\fR(5), .SH "NOTES" .IP " 1." 4 It is recommended for other tools to set and check \fI$SUDO_UID\fR as appropriate, treating it is a common interface.