Ubuntu and Debian Security in Short
Ubuntu and Debian fix security flaws in their own packages, usually by adding the fix to the version they shipped rather than moving to a new version. So apt keeps you safe as long as two things are true: updates are being installed, and your release is still supported.
How to Keep Ubuntu and Debian Patched
- Turn on
unattended-upgradesfor security updates. Check/var/log/unattended-upgrades/now and then to see it's working. - Reboot after kernel updates (
/var/run/reboot-requiredappears when one is needed) and restart services after library updates (needrestart). - Know when your release stops getting updates. Ubuntu LTS releases get five years of standard support; Debian releases get about three years, then two more of LTS. See Bobble Solutions' end-of-life tracker for dates.