Quick Tip: Finding if a Linux server has a pending reboot

Linux servers generally don’t need to reboot that often. Normally they should only reboot after the kernel is patched or is upgraded. To determine if there is a pending reboot on a Linux server, just check if the following file exists.


If it doesn’t exist, then the server does not need to be rebooted.

A nice easy Bash script can also check for this:

if [ -f /var/run/reboot-required ]; then

  • echo ‘System needs to be rebooted’*