Saturday, May 18, 2024
rated 0 times [  3] [ 0]  / answers: 1 / hits: 809  / 1 Year ago, wed, may 10, 2023, 12:10:18

I'm using unattended upgrades and I want to reboot automatically when kernel is upgraded.

Is that possible?

More From » unattended-upgrades


You can set up automatic reboot after Unattended Upgrades has upgraded/installed something that requires reboot. That includes installing new kernels.

Related configuration variables:

// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";

// Automatically reboot even if there are users currently logged in
// when Unattended-Upgrade::Automatic-Reboot is set to true
//Unattended-Upgrade::Automatic-Reboot-WithUsers "true";

// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
// Default: "now"
//Unattended-Upgrade::Automatic-Reboot-Time "02:00";

Save your preferred settings in file /etc/apt/apt.conf.d/52unattended-upgrades-local (so that you do not have to modify 50unattended-upgrades provided by the package).

You can see explicitly set configuration values by
apt-config dump unattended-upgrade

Unfortunately, you can not list all current values.

You could see more documentation (of the latest version) at

Unfortunately not all supported options are explained there, though:

[#681] Wednesday, May 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 184
Total Questions: 115
Total Answers: 112

Location: Colombia
Member since Thu, Sep 29, 2022
2 Years ago
ainbby questions