当我登录时,我有一条“每日消息”,它似乎来自文件 /var/lib/update-notifier/updates-available:
root@ls:~# cat /var/lib/update-notifier/updates-available
95 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable
但是,当我运行无人值守升级时,它说没有可用的安全更新:
root@ls:~# unattended-upgrades --dry-run -v
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
No packages found that can be upgraded unattended and no pending auto-removals
以防万一,这是我的 sources.list 文件:
deb http://archive.ubuntu.com/ubuntu bionic main restricted
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
deb http://archive.ubuntu.com/ubuntu bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates universe
deb http://archive.ubuntu.com/ubuntu bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
deb http://archive.ubuntu.com/ubuntu bionic-security universe
deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
编辑 1: apt list-upgradable 的输出
Listing... Done
apt/bionic-updates 1.6.14 amd64 [upgradable from: 1.6.12ubuntu0.2]
apt-utils/bionic-updates 1.6.14 amd64 [upgradable from: 1.6.12ubuntu0.2]
base-files/bionic-updates 10.1ubuntu2.11 amd64 [upgradable from: 10.1ubuntu2.8]
bcache-tools/bionic-updates 1.0.8-2ubuntu0.18.04.1 amd64 [upgradable from: 1.0.8-2build1]
cloud-init/bionic-updates 21.4-0ubuntu1~18.04.1 all [upgradable from: 19.4-33-gbb4131a2-0ubuntu1~18.04.1]
cryptsetup/bionic-updates 2:2.0.2-1ubuntu1.2 amd64 [upgradable from: 2:2.0.2-1ubuntu1.1]
cryptsetup-bin/bionic-updates 2:2.0.2-1ubuntu1.2 amd64 [upgradable from: 2:2.0.2-1ubuntu1.1]
dirmngr/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
dmeventd/bionic-updates 2:1.02.145-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2:1.02.145-4.1ubuntu3.18.04.2]
dmsetup/bionic-updates 2:1.02.145-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2:1.02.145-4.1ubuntu3.18.04.2]
dnsmasq-base/bionic-updates 2.79-1ubuntu0.5 amd64 [upgradable from: 2.79-1ubuntu0.4]
friendly-recovery/bionic-updates 0.2.38ubuntu1.2 all [upgradable from: 0.2.38ubuntu1.1]
gnupg/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gnupg-l10n/bionic-updates 2.2.4-1ubuntu1.4 all [upgradable from: 2.2.4-1ubuntu1.3]
gnupg-utils/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpg/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpg-agent/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpg-wks-client/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpg-wks-server/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpgconf/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpgsm/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gpgv/bionic-updates 2.2.4-1ubuntu1.4 amd64 [upgradable from: 2.2.4-1ubuntu1.3]
gzip/bionic-updates 1.6-5ubuntu1.1 amd64 [upgradable from: 1.6-5ubuntu1]
initramfs-tools/bionic-updates 0.130ubuntu3.13 all [upgradable from: 0.130ubuntu3.9]
initramfs-tools-bin/bionic-updates 0.130ubuntu3.13 amd64 [upgradable from: 0.130ubuntu3.9]
initramfs-tools-core/bionic-updates 0.130ubuntu3.13 all [upgradable from: 0.130ubuntu3.9]
iproute2/bionic-updates 4.15.0-2ubuntu1.3 amd64 [upgradable from: 4.15.0-2ubuntu1.1]
kmod/bionic-updates 24-1ubuntu3.5 amd64 [upgradable from: 24-1ubuntu3.2]
landscape-common/bionic-updates 18.01-0ubuntu3.5 amd64 [upgradable from: 18.01-0ubuntu3.4]
libapt-inst2.0/bionic-updates 1.6.14 amd64 [upgradable from: 1.6.12ubuntu0.2]
libapt-pkg5.0/bionic-updates 1.6.14 amd64 [upgradable from: 1.6.12ubuntu0.2]
libaudit-common/bionic-updates 1:2.8.2-1ubuntu1.1 all [upgradable from: 1:2.8.2-1ubuntu1]
libaudit1/bionic-updates 1:2.8.2-1ubuntu1.1 amd64 [upgradable from: 1:2.8.2-1ubuntu1]
libc-bin/bionic-updates 2.27-3ubuntu1.4 amd64 [upgradable from: 2.27-3ubuntu1.2]
libc6/bionic-updates 2.27-3ubuntu1.4 amd64 [upgradable from: 2.27-3ubuntu1.2]
libcryptsetup12/bionic-updates 2:2.0.2-1ubuntu1.2 amd64 [upgradable from: 2:2.0.2-1ubuntu1.1]
libdevmapper-event1.02.1/bionic-updates 2:1.02.145-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2:1.02.145-4.1ubuntu3.18.04.2]
libdevmapper1.02.1/bionic-updates 2:1.02.145-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2:1.02.145-4.1ubuntu3.18.04.2]
libdrm-common/bionic-updates 2.4.101-2~18.04.1 all [upgradable from: 2.4.99-1ubuntu1~18.04.2]
libdrm2/bionic-updates 2.4.101-2~18.04.1 amd64 [upgradable from: 2.4.99-1ubuntu1~18.04.2]
libgnutls30/bionic-updates 3.5.18-1ubuntu1.5 amd64 [upgradable from: 3.5.18-1ubuntu1.3]
libkmod2/bionic-updates 24-1ubuntu3.5 amd64 [upgradable from: 24-1ubuntu3.2]
liblvm2app2.2/bionic-updates 2.02.176-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2.02.176-4.1ubuntu3.18.04.2]
liblvm2cmd2.02/bionic-updates 2.02.176-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2.02.176-4.1ubuntu3.18.04.2]
libnss-systemd/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
libpam-modules/bionic-updates 1.1.8-3.6ubuntu2.18.04.3 amd64 [upgradable from: 1.1.8-3.6ubuntu2.18.04.1]
libpam-modules-bin/bionic-updates 1.1.8-3.6ubuntu2.18.04.3 amd64 [upgradable from: 1.1.8-3.6ubuntu2.18.04.1]
libpam-runtime/bionic-updates 1.1.8-3.6ubuntu2.18.04.3 all [upgradable from: 1.1.8-3.6ubuntu2.18.04.1]
libpam-systemd/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
libpam0g/bionic-updates 1.1.8-3.6ubuntu2.18.04.3 amd64 [upgradable from: 1.1.8-3.6ubuntu2.18.04.1]
libpcap0.8/bionic-updates 1.8.1-6ubuntu1.18.04.2 amd64 [upgradable from: 1.8.1-6ubuntu1.18.04.1]
libssl1.1/bionic-updates 1.1.1-1ubuntu2.1~18.04.14 amd64 [upgradable from: 1.1.1-1ubuntu2.1~18.04.13]
libsystemd0/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
libudev1/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
libxau6/bionic-updates 1:1.0.8-1ubuntu1 amd64 [upgradable from: 1:1.0.8-1]
linux-base/bionic-updates 4.5ubuntu1.7 all [upgradable from: 4.5ubuntu1.2]
linux-firmware/bionic-updates 1.173.20 all [upgradable from: 1.173.18]
locales/bionic-updates 2.27-3ubuntu1.4 all [upgradable from: 2.27-3ubuntu1.2]
lshw/bionic-updates 02.18-0.1ubuntu6.18.04.2 amd64 [upgradable from: 02.18-0.1ubuntu6.18.04.1]
lvm2/bionic-updates 2.02.176-4.1ubuntu3.18.04.3 amd64 [upgradable from: 2.02.176-4.1ubuntu3.18.04.2]
lxcfs/bionic-updates 3.0.3-0ubuntu1~18.04.2 amd64 [upgradable from: 3.0.3-0ubuntu1~18.04.1]
multiarch-support/bionic-updates 2.27-3ubuntu1.4 amd64 [upgradable from: 2.27-3ubuntu1.2]
netplan.io/bionic-updates 0.99-0ubuntu3~18.04.5 amd64 [upgradable from: 0.98-0ubuntu1~18.04.1]
nplan/bionic-updates 0.99-0ubuntu3~18.04.5 all [upgradable from: 0.98-0ubuntu1~18.04.1]
open-iscsi/bionic-updates 2.0.874-5ubuntu2.10 amd64 [upgradable from: 2.0.874-5ubuntu2.7]
open-vm-tools/bionic-updates 2:11.0.5-4ubuntu0.18.04.1 amd64 [upgradable from: 2:11.0.1-2ubuntu0.18.04.2]
openssl/bionic-updates 1.1.1-1ubuntu2.1~18.04.14 amd64 [upgradable from: 1.1.1-1ubuntu2.1~18.04.13]
pollinate/bionic-updates 4.33-0ubuntu1~18.04.2 all [upgradable from: 4.33-0ubuntu1~18.04.1]
python-apt-common/bionic-updates 1.6.5ubuntu0.7 all [upgradable from: 1.6.5ubuntu0.5]
python3-apt/bionic-updates 1.6.5ubuntu0.7 amd64 [upgradable from: 1.6.5ubuntu0.5]
python3-distupgrade/bionic-updates 1:18.04.45 all [upgradable from: 1:18.04.37]
python3-httplib2/bionic-updates 0.9.2+dfsg-1ubuntu0.3 all [upgradable from: 0.9.2+dfsg-1ubuntu0.2]
python3-software-properties/bionic-updates 0.96.24.32.18 all [upgradable from: 0.96.24.32.14]
python3-update-manager/bionic-updates 1:18.04.11.13 all [upgradable from: 1:18.04.11.10]
rsync/bionic-updates 3.1.2-2.1ubuntu1.2 amd64 [upgradable from: 3.1.2-2.1ubuntu1.1]
snapd/bionic-updates 2.51.1+18.04 amd64 [upgradable from: 2.48.3+18.04]
software-properties-common/bionic-updates 0.96.24.32.18 all [upgradable from: 0.96.24.32.14]
sosreport/bionic-updates 4.1-1ubuntu0.18.04.3 amd64 [upgradable from: 3.6-1ubuntu0.18.04.4]
systemd/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
systemd-sysv/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
ubuntu-advantage-tools/bionic-updates 27.5~18.04.1 all [upgradable from: 17]
ubuntu-keyring/bionic-updates 2018.09.18.1~18.04.2 all [upgradable from: 2018.09.18.1~18.04.0]
ubuntu-minimal/bionic-updates 1.417.5 amd64 [upgradable from: 1.417.4]
ubuntu-release-upgrader-core/bionic-updates 1:18.04.45 all [upgradable from: 1:18.04.37]
ubuntu-server/bionic-updates 1.417.5 amd64 [upgradable from: 1.417.4]
ubuntu-standard/bionic-updates 1.417.5 amd64 [upgradable from: 1.417.4]
udev/bionic-updates 237-3ubuntu10.53 amd64 [upgradable from: 237-3ubuntu10.50]
ufw/bionic-updates 0.36-0ubuntu0.18.04.2 all [upgradable from: 0.36-0ubuntu0.18.04.1]
unattended-upgrades/bionic-updates 1.1ubuntu1.18.04.14 all [upgradable from: 1.1ubuntu1.18.04.13]
update-manager-core/bionic-updates 1:18.04.11.13 all [upgradable from: 1:18.04.11.10]
那么谁在说真话,update-notifier-common 还是 unattended-upgrades? 编辑 2:我想知道“其中一个更新是标准安全更新”在哪里。来自?如何获取此类更新的包名称?
如果运行,我什么也得不到:
apt-get upgrade -s | grep ^Inst | grep -i security
不同之处在于无人值守升级依赖于“升级”(如何获取所有待处理安全更新的列表?),但更新通知器依赖于“dist-upgrade”。
可以验证运行:
所以,90 + 5 = 95
并且“其中一个更新是标准的安全更新”。来自: