Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I use apt to update my system (e.g. run sudo aptitude full-upgrade) it sometimes installs updates that require reboots. This applies esp. for kernel (security) updates.

I can sometimes see this in the ssh login message. I'm wondering how (else) I may determine whether the system needs a reboot due to these updates.

share|improve this question
up vote 5 down vote accepted

The MOTD "restart required" text is generated by /usr/lib/update-notifier/update-motd-reboot-required, which checks for the existence of and pulls text from /var/run/reboot-required:

#!/bin/sh -e
# helper for update-motd

if [ -f /var/run/reboot-required ]; then
        cat /var/run/reboot-required
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.