MirrorNest
← Alle Anleitungen

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.

Zielsystem: Ubuntu 22.04 LTS / 24.04 LTSSecurityMaintenanceOffizielle Website ↗Offizielle Dokumentation ↗
Diese Anleitung basiert auf der offiziellen Dokumentation von Automatic security updates on Ubuntu Server, oben verlinkt — überprüfe dort immer die genauen Paket-/Versionsnamen, bevor du diese Befehle auf einem Produktionsserver ausführst, da sich Distributions- und Projektversionen mit der Zeit ändern.
  1. 1Install unattended-upgrades

    sudo apt update
    sudo apt install unattended-upgrades apt-listchanges
  2. 2Enable it

    Choose "Yes" on the prompt -- this enables the daily systemd timer that applies updates.

    sudo dpkg-reconfigure --priority=low unattended-upgrades
  3. 3Review what gets auto-updated

    cat /etc/apt/apt.conf.d/50unattended-upgrades

    By 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.

  4. 4Verify it's actually running

    sudo unattended-upgrade --dry-run --debug