How to set up automatic updates for Ubuntu Linux 18.04

How to set up automatic updates for Ubuntu Linux 18.04

To set up automatic updates for Ubuntu 18.04, follow these steps:

  1. Install the unattended-upgrades package:
refer‮al:ot ‬utturi.com
sudo apt-get update
sudo apt-get install unattended-upgrades
  1. Configure the package to automatically install updates. Open the /etc/apt/apt.conf.d/50unattended-upgrades file in a text editor and uncomment the following line:
"${distro_id}:${distro_codename}-updates";

This will enable automatic installation of security updates.

  1. To enable automatic installation of all updates, including non-security updates, uncomment the following line as well:
"${distro_id}:${distro_codename}-security";
"${distro_id}:${distro_codename}";
  1. Save and close the file.

  2. To configure the frequency of updates, open the /etc/apt/apt.conf.d/20auto-upgrades file in a text editor and modify the APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade options. For example, to check for updates daily and install them automatically:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
  1. Save and close the file.

Automatic updates will now be enabled and configured according to the specified frequency and scope. For more information about configuring automatic updates in Ubuntu, see the unattended-upgrades documentation.

Created Time:2017-10-29 22:08:38  Author:lautturi