unattended-upgrades in Ubuntu automatically installs security updates including the kernel but does not reboot automatically (and it's OK, I don't need/want automatic reboots).
How can I find out whether the running kernel = the latest installed kernel?
I can get the current kernel version by:
$ uname -r
5.4.0-104-generic
The latest installed kernel can be found out by:
$ dpkg -s linux-image-generic | awk '/Version:/{print $2}'
5.4.0.104.108
These two don't match. I can use bash sorcery to compare these two strings (and then .108 needs to go - why?) but I'd prefer to use something standard.