Just how can I inform, from the command line, whether the equipment calls for a reboot?

When you install particular updates (e.g. a new bit) in Ubuntu Desktop, you get a sign that a reboot is called for (in Lucid, the logout symbol reddens).

Just how can I examine, from the command line, whether an Ubuntu web server calls for a reboot?

I can grep for 'System reactivate called for' in /etc/motd, yet I would certainly such as a remedy that's even more classy. Additionally, I desire a remedy that operates in older launches, e.g. Hardy (8.04 LTS).

2019-05-07 08:34:31
Source Share
Answers: 4

Aswell as one of the most straight approaches created by others there is a convenient sign if you make use of byobu - a set of manuscripts to make GNU screen a little bit even more easy to use. It reveals a set of details at the end of the screen, which can include whether a reboot is called for - in addition to whether updates are readily available, the moment, uptime, memory made use of ...

In this screenshot you can see from the 199! under line with the red history that there are 199 updates readily available, and also the ! suggests that some are protection updates. The food selection in the foreground is picking which standing alerts need to be presented.

If a reboot is called for after that this will certainly be shown by the icon (R) presented in the lower bar with white message on a blue history. Even more information and also various other indications can be reviewed in the byobu man page.

2019-05-09 07:52:24

Normally if the documents


exists you need to reboot. You can see if this documents exists by utilizing this straightforward command in gnome - terminal.

ls /var/run/reboot-required
2019-05-09 04:04:42

The /etc/motd documents obtains its details concerning whether a reboot is called for from /var/run/reboot-required documents.

You can examine the web content of this documents in incurable by utilizing cat /etc/motd command

2019-05-09 04:02:04

You can merely examine if the documents /var/run/reboot-required exists or otherwise.

As an example, any one of these would certainly inform you "no such documents" or "documents not located" if you do not require to reboot, or else (if you require to reboot) the documents would certainly exist and also these commands would certainly show details concerning the documents:

file /var/run/reboot-required
stat /var/run/reboot-required
ls /var/run/reboot-required

In a celebration manuscript, you can make use of:

if [ -f /var/run/reboot-required ]; then
  echo 'reboot required'
2019-05-09 02:02:41