在 Ubuntu 20.04 机器上,当我通过 ssh 登录时,我看到
59 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable
现在,我只想安装“标准安全更新”。
我尝试过unattended-upgrade
(sudo unattended-upgrade -d
),但得到
...
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
Packages blacklist due to conffile prompts: []
No packages found that can be upgraded unattended and no pending auto-removals
...
从我的在线研究中unattended-upgrade
可以找到安装安全更新的方法。我在这里遗漏了什么?是因为安全更新是“标准”更新吗?
更新 1
~$ sudo apt list --upgradable | grep security |cut -d\/ -f1|xargs sudo apt-get install -y
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.