*** System restart required *** on Ubuntu and Should I restart when prompted?

Hello,

When I log in to my AWS EC2 host with Ubuntu Linux server, I always see message like:

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-74-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Wed Jun 23 12:03:21 UTC 2021

  System load:           0.57
  Usage of /:            0.6% of 629.64GB
  Memory usage:          1%
  Swap usage:            0%
  Processes:             261
  Users logged in:       0
  IPv4 address for eth0: 172.0.0.2

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.


*** System restart required ***
Last login: Wed Jun 23 12:01:40 2021 from 

So questions:

  • Should I always restart the system after seeing this message over ssh? Is it safe to restart when prompted like this?
  • Where and how this message comes? Who is creating this message? Linux kernel? Ubuntu service?
  • Who applied these updates as I never did it?

Please guide me to understand these queries.

  • Should I always restart the system after seeing this message over ssh? Is it safe to restart when prompted like this?

Yes, you can reboot the server. It is safe.

  • Where and how this message comes? Who is creating this message? Linux kernel? Ubuntu service?

If the file /var/run/reboot-required exists, you get the above message. Use the following command to view it on Ubuntu Linux:

cat /var/run/reboot-required

This file created by Ubuntu wherever new Linux kernel installed that requires full system reboot. See

  • Who applied these updates as I never did it?

Ubuntu comes with automatic unattended updates for Ubuntu 20.04 LTS enabled or configured. That is how updates get installed on the system. See

And

2 Likes

Hey, it worked and thank you for all useful documentations.


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki