An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
September 23, 2022 10:19 am GMT
Original Link: https://dev.to/sylvainkerkour/how-to-enable-automatic-updates-on-ubuntu-2b7
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:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To