Let us assume you just logged via SSH into a server running Ubuntu.
Is there a simple command to find out whether unattended-upgrades are enabled and will install security critical updates automatically?
Let us assume you just logged via SSH into a server running Ubuntu.
Is there a simple command to find out whether unattended-upgrades are enabled and will install security critical updates automatically?
shows if things get auto-installed
This will show you what gets automatically installed. And by default it should install the security ones. There are other files there depending on which system exactly you are running so cat your way around them maybe.
The configuration can be looked up in
/etc/apt/apt.conf.d/20auto-upgrades
. In addition, you can check the log file/var/log/dpkg.log
. If unattended upgrades are working, you should see recent events there.Let us look at two example sessions:
Machine 1 (unattended upgrades disabled):
Machine 2 (unattended upgrades enabled):
(Machine 1 was running Ubuntu 16.04, Machine 2 was running Ubuntu 17.04. It should not make a difference, though.)