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-Lists
value from “0” to “1”. This will enable package list updates. - Change the
APT::Periodic::Unattended-Upgrade
value from “0” to “1”. This will enable unattended upgrades. - 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.