How to set up automatic updates for Ubuntu Linux 18.04

To set up automatic updates for Ubuntu Linux 18.04, you can use the unattended-upgrades package.

  1. First, make sure that the package is installed by running:
sudo apt-get update
sudo apt-get install unattended-upgrades
  1. Next, open the configuration file:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
  1. In the file, uncomment the line that starts with "//Unattended-Upgrade::Origins-Pattern". This will allow the package to upgrade all packages, not just security upgrades.
  2. Save and close the file.
  3. Next, open the config file for the package:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
  1. Change the APT::Periodic::Update-Package-Lists value from “0” to “1”. This will enable package list updates.
  2. Change the APT::Periodic::Unattended-Upgrade value from “0” to “1”. This will enable unattended upgrades.
  3. Save and close the file.

Now, Ubuntu will automatically check for and install updates on a daily basis. The package upgrades will be installed automatically and you will be notified of the upgrades via email.

Leave a Comment