← Tutte le guide
Automatic security updates on Ubuntu Server
Configure unattended-upgrades so security patches install automatically without manual intervention -- reduces the window a known vulnerability stays unpatched on a server nobody logs into daily.
Questa guida è redatta a partire dalla documentazione ufficiale di Automatic security updates on Ubuntu Server, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
1Install unattended-upgrades
sudo apt updatesudo apt install unattended-upgrades apt-listchanges2Enable it
Choose "Yes" on the prompt -- this enables the daily systemd timer that applies updates.
sudo dpkg-reconfigure --priority=low unattended-upgrades3Review what gets auto-updated
cat /etc/apt/apt.conf.d/50unattended-upgradesBy default only the -security repository is included. Uncomment additional origins in this file only if you specifically want full unattended upgrades, not just security patches.
4Verify it's actually running
sudo unattended-upgrade --dry-run --debug