Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 23, 2022 10:19 am GMT

How to enable automatic updates on Ubuntu

Originally published on my blog: https://kerkour.com/ubuntu-linux-automatic-updates-with-unattended-upgrades

Life is too short to manually upgrade the packages of your machine twice a week, so here is how to automate the software updates of an Ubuntu server (20.04 or 22.04).

First, you need to install unattended-upgrades:

$ sudo apt install unattended-upgrades

Then configure it:

$ sudo dpkg-reconfigure -plow unattended-upgrades

and select yes on the dialog.

Then, you need to enable automatic updates on a daily basis:

$ vim /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";APT::Periodic::Download-Upgradeable-Packages "1";APT::Periodic::AutocleanInterval "7";APT::Periodic::Unattended-Upgrade "1";

Finally, you may want to disable kernel updates that require a reboot:

$ sudo vim /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Package-Blacklist {   // The following matches all packages starting with linux-   "linux-";};Unattended-Upgrade::Automatic-Reboot "false";

Original Link: https://dev.to/sylvainkerkour/how-to-enable-automatic-updates-on-ubuntu-2b7

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To