I just installed some updated on my Ubuntu server. Some of them were kernel and Linux Headers, so I suspected that a reboot was required, but I wanted to know for sure. So, on foot of a recommendation from this site, I installed checkrestart
.
$ checkrestart
ERROR: This program must be run as root in order to obtain information
about all open file descriptors in the system.
$ sudo !!
sudo checkrestart
Found 0 processes using old versions of upgraded files
Hmm. No restart necessary? That seems odd.
$ exit
logout
Connection to example.net closed.
$ ssh trig@example.net && alert
trig@example.net's password:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-92-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
*** System restart required ***
Oh. So a restart is required? Why didn’t you say so?
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
How can I know whether a restart is required after installing updates?