How do you know whether a server needs a reboot after patching?
BeginnerProductionPatching, Automation & Golden Images
Answer
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required.pkgs # Debian/Ubuntu
sudo dnf needs-restarting -r # RHEL: exit code 1 = reboot needed
sudo dnf needs-restarting -s # services that need a restart
sudo needrestart -r l # Debian: list services using old libraries
Also compare uname -r with the newest installed kernel.
More on Patching, Automation & Golden Images
What does a good Linux patching strategy look like?BeginnerIn-place patching vs immutable image replacement: which do you prefer?IntermediateHow do you configure automatic security updates?BeginnerWhat is kernel live patching?IntermediateHow do you roll kernel updates across a 200-node fleet safely?AdvancedWhat is a golden image?Beginner