Ubuntu Enable & Set up Automatic Unattended Security Updates

Ubuntu Enable & Set up Automatic Unattended Security Updates

On Ubuntu Linux, you can use the unattended-upgrades package to enable and set up automatic unattended security updates. Unattended-upgrades is a package that automatically installs security updates without user intervention.

To enable and set up automatic unattended security updates on Ubuntu, you can use the following steps:

  1. Install the unattended-upgrades package by running the following command:
sudo apt-get install unattended-upgrades
Source‮:‬www.lautturi.com
  1. Enable the unattended-upgrades service by running the following command:
sudo systemctl enable unattended-upgrades
  1. Configure the unattended-upgrades package by editing the /etc/apt/apt.conf.d/50unattended-upgrades configuration file. You can use a text editor such as nano to edit the file:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

In the configuration file, you can set the Unattended-Upgrade options to specify which updates should be installed automatically. For example, to enable automatic installation of security updates, you can set the Unattended-Upgrade::Automatic-Reboot and Unattended-Upgrade::Automatic-Reboot-Time options like this:

Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";

This will enable automatic reboots if necessary and specify that they should be performed at 2:00 AM.

  1. Save the configuration file and close the text editor.

That's it! Automatic unattended security updates should now be enabled and configured on your Ubuntu system. The updates will be installed automatically in the background without user intervention.

Created Time:2017-10-30 14:27:24  Author:lautturi