Introduction#
This guide will walk you through the steps to update and upgrade your Ubuntu system, configure unattended upgrades for automatic updates, and adjust settings to prevent automatic reboots during upgrades. By following these steps, you can ensure your system remains up-to-date and secure without manual intervention.
Update and Upgrade#
First, update the package lists:
sudo apt update && sudo apt upgrade -y
Reconfigure Unattended Upgrades#
To reconfigure unattended upgrades for automatic updates, run:
sudo dpkg-reconfigure --priority=low unattended-upgrades
Verify Configuration#
Verify the configuration file for unattended upgrades using your text editor of choice:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Disable Automatic Reboots#
To disable automatic reboots during upgrades, edit the following file:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Uncomment the line by removing the leading slashes:
//Unattended-Upgrade::Automatic-Reboot "false";
This will prevent automatic reboots after updates.