needrestart command included in the needrestart package in Ubuntu.
needrestart
-r <mode> set restart mode l (l)ist only i (i)nteractive restart a (a)utomatically restart
needs-restarting -r
reboot, poweroff, halt
systemctl reboot, shutdown, needrestart, needs-restarting
Advertising: