How to set up automatic security updates on Ubuntu
Answered
17
I want my Ubuntu server to automatically install security updates. How do I configure unattended-upgrades?
O
Asked by
omar_linux
Platinum
•
593 rep
1 Answer
24
Install unattended-upgrades
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Configure settings
# Edit /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}-security";
};
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";
Enable automatic updates
# Edit /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
H
Bronze
•
565 rep
Your Answer
You need to be logged in to answer questions.
Log In to Answer