Skip to content
Maxim Orlov Logo

Helping Node.js developers write robust applications 🚀

Programatically Check If System Requires Restart

💡 How do you programatically find out if a system needs to be restarted?

👉🏼 Check for the existence of "/var/run/reboot-required" file. Also, "/var/run/reboot-required.pkgs" shows the related packages.

Run cat /var/run/reboot-required to check if system requires a reboot. cat /var/run/reboot-required.pkgs shows the packages that involved.