[ubuntu-uk] Checking if a System restart is required

Alan Pope alan at popey.com
Thu Apr 21 15:55:57 UTC 2011


On 21 April 2011 16:52, Paul Willis <paul.willis at me.com> wrote:
> Occasionally, after running...
> sudo apt-get update && sudo apt-get upgrade -y
> ...my server it needs a reboot. Trouble is I don't see the *** System restart required *** message until next time I log in.
>
> I usually log out and back in again straight after running the update but I'm sure there must be a command to check if a reboot is required without doing that.

/usr/lib/update-notifier/update-motd-reboot-required

e.g.:-

$ /usr/lib/update-notifier/update-motd-reboot-required
*** System restart required ***

or..

$ cat /var/run/reboot-required
*** System restart required ***

Al.



More information about the ubuntu-uk mailing list