
How to Set Up Automatic Security Updates on Debian and Ubuntu
Keeping your Ubuntu server secure and up-to-date is crucial to minimizing the risk of vulnerabilities. One effective way to ensure timely patching of critical security issues is to enable automatic updates using unattended-upgrades. Here’s how to configure it step by step. Cronjob Onliner (every sunday 3.00AM): # Check current cronjobs sudo crontab -l # Add cronjob for weekly updates with reboot (Sunday 3:00 AM) (sudo crontab -l; echo "0 3 * * 0 /usr/bin/apt-get update && DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get --assume-yes upgrade && $(whereis -b reboot | cut -d' ' -f2)") | sudo crontab - # Verify sudo crontab -l Or the real deal :) ...