🔑 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-get update
Then, upgrade all installed packages:
sudo apt-get upgrade
⚙️ 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:
/etc/apt/apt.conf.d/20auto-upgrades
🔧 Disable Automatic Reboots#
To disable automatic reboots during upgrades, edit the following file:
/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.