Ubuntu - Enable auto-update
Introduction
OS updates keep your Ubuntu server and several programs installed on it updated. Updates often include feature enhancements and security updates to protect your server from malware and malicious attacks. This guide shows you how to enable auto-update for your server.
Prerequisites
- Ubuntu Server
Step-by-step Guide
-
Edit the update configure file:
nano /etc/apt/apt.conf.d/50unattended-upgrades
-
Uncomment the following line:
"${distro_id}:${distro_codename}-updates";
-
Uncomment the following line and change the value to true:
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; Unattended-Upgrade::Remove-Unused-Dependencies "true"; Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot-Time "02:00";
Conclusion
Congratulations, now you have an auto-update enabled for your Ubuntu server!