Interview Prep/Linux/Scheduling, automation and scripting

Your team wants every server to automatically install security updates. How do you set it up and stay safe?

IntermediateScenarioScheduling, automation and scripting
Answer

Situation read → Automate patching without surprise outages.

What I'd do →

  • Ubuntu/Debian: apt install unattended-upgrades and enable security origins in /etc/apt/apt.conf.d/50unattended-upgrades.
  • RHEL/Rocky: dnf install dnf-automatic, set upgrade_type = security and apply_updates = yes in /etc/dnf/automatic.conf, then systemctl enable --now dnf-automatic.timer.
  • Roll out in rings: canary hosts first, then the fleet a day later. Control reboots separately.

Why → Security-only updates have low regression risk; rings catch the rest.

Interview tip → Mention needs-restarting -r (RHEL) or /var/run/reboot-required (Ubuntu) for reboot detection.

All Linux questions Roadmap: Linux

More on Scheduling, automation and scripting