table of contents
UPDATECTL(1) | updatectl | UPDATECTL(1) |
NAME¶
updatectl - Control the system update service
SYNOPSIS¶
updatectl [OPTIONS...] {COMMAND} [TARGET...]
DESCRIPTION¶
updatectl may be used to check for and install system updates managed by systemd-sysupdated.service(8).
COMMANDS¶
The following commands are understood:
list [TARGET[@VERSION]]
When no TARGET is specified, this command lists all available targets. When a TARGET is specified without a VERSION, this command lists all known versions of the specified target. If a VERSION is specified, this command lists all known information about the specific version.
See the example below for details of the output.
Added in version 257.
check [TARGET...]
See the example below for details of the output.
Added in version 257.
update [TARGET[@VERSION]...]
Added in version 257.
vacuum [TARGET...]
Added in version 257.
features [FEATURE]
Added in version 257.
enable FEATURE..., disable FEATURE...
By default, these commands will only change the system's 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 --now to immediately apply these changes.
Added in version 257.
-h, --help
--version
OPTIONS¶
The following commands are understood:
--reboot
When used with the enable or disable commands and the --now flag, reboots the system after download or clean-up finish applying.
Added in version 257.
--offline
Added in version 257.
--now
Added in version 257.
-H, --host=
--no-pager
--no-legend
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.
ENVIRONMENT¶
$SYSTEMD_LOG_LEVEL
$SYSTEMD_LOG_COLOR
This setting is only useful when messages are written directly to the terminal, because journalctl(1) and other tools that display logs will color messages based on the log level on their own.
$SYSTEMD_LOG_TIME
This setting is only useful when messages are written directly to the terminal or a file, because journalctl(1) and other tools that display logs will attach timestamps based on the entry metadata on their own.
$SYSTEMD_LOG_LOCATION
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.
$SYSTEMD_LOG_TID
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.
$SYSTEMD_LOG_TARGET
$SYSTEMD_LOG_RATELIMIT_KMSG
$SYSTEMD_PAGER, $PAGER
Note: if $SYSTEMD_PAGERSECURE is not set, $SYSTEMD_PAGER and $PAGER can only be used to disable the pager (with "cat" or ""), and are otherwise ignored.
$SYSTEMD_LESS
Users might want to change two options in particular:
K
If the value of $SYSTEMD_LESS does not include "K", and the pager that is invoked is less, Ctrl+C will be ignored by the executable, and needs to be handled by the pager.
X
Note that setting the regular $LESS environment variable has no effect for less invocations by systemd tools.
See less(1) for more discussion.
$SYSTEMD_LESSCHARSET
Note that setting the regular $LESSCHARSET environment variable has no effect for less invocations by systemd tools.
$SYSTEMD_PAGERSECURE
This option takes a boolean argument. When set to true, the "secure mode" of the pager is enabled. In "secure mode", LESSSECURE=1 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 less(1) is known to understand this variable and implement "secure mode".
When set to false, no limitation is placed on the pager. Setting SYSTEMD_PAGERSECURE=0 or not removing it from the inherited environment may allow the user to invoke arbitrary commands.
When $SYSTEMD_PAGERSECURE 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 geteuid(2) and sd_pid_get_owner_uid(3), or when running under sudo(8) or similar tools ($SUDO_UID is set [1]). In those cases, SYSTEMD_PAGERSECURE=1 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 $SYSTEMD_PAGERSECURE or disable the pager.
Note that if the $SYSTEMD_PAGER or $PAGER variables are to be honoured, other than to disable the pager, $SYSTEMD_PAGERSECURE must be set too.
$SYSTEMD_COLORS
$SYSTEMD_URLIFY
EXAMPLES¶
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'd like machine-readable output, use the org.freedesktop.sysupdate1(5) D-Bus API directly.
Example 1. Output from list
$ updatectl list TARGET VERSION PATH host 48 sysupdate.d machine:fedora 38 /var/lib/machines/fedora.raw component:shim 15.7 sysupdate.shim.d $ updatectl list host
VERSION STATUS ↻ 50 candidate
49 available ● 48 current
47 available
46 available
45 available [...] × 25 available+obsolete × 24 available+obsolete × 23 available+obsolete [...] $ updatectl list host@49 ↻ 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
Example 2. Checking for and installing updates
$ updatectl check TARGET UPDATE host 48 → 50 machine:fedora 38 → 40 $ updatectl update host machine:fedora@39 [...] ✓ host@50 ✓ machine:fedora@39
SEE ALSO¶
systemd(1), systemd-sysupdate(8) systemd-sysupdated.service(8) sysupdate.d(5),
NOTES¶
- 1.
- It is recommended for other tools to set and check $SUDO_UID as appropriate, treating it is a common interface.
systemd 257.9 |