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.
- First, make sure that the package is installed by running:
sudo apt-get update
sudo apt-get install unattended-upgrades- Next, open the configuration file:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades- 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. - Save and close the file.
- Next, open the config file for the package:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades- Change the
APT::Periodic::Update-Package-Listsvalue from "0" to "1". This will enable package list updates. - Change the
APT::Periodic::Unattended-Upgradevalue from "0" to "1". This will enable unattended upgrades. - Save and close the file.
