5

Yesterday I, from the gui, shut my computer down to physically move it. Then I turned it back on.

Today when I ssh into it from a different computer I'm told "* System restart required *"

It's reasonable to think I had a reboot left over from packages I installed last week, but that would mean a full power down isn't a superset of a reboot.

I'm using Ubuntu 16.04.4 LTS

  • 4
    ubuntu uses a cron script to automatically update your packages. if any new packages has been install it will notice you to reboot – Kiwy Apr 20 '18 at 15:50
  • I know in recent Windows versions, shutting down is often configured to do something like hibernation, while restarting will actually shut down and start again. I'm not aware of that ever happening in Linux (but I hope they don't start doing that). – Brōtsyorfuzthrāx Apr 20 '18 at 21:44
  • And that script runs right at boot, so it's possible the system has installed new updates before you have logged in. – Michael Hampton Apr 21 '18 at 01:24
  • 1
    The question in the title is not the question being asked. For an answer to the question in the title, see https://unix.stackexchange.com/questions/195898/ and the like. The question actually being asked is Why did powering my machine off and then on again not count as a reboot for the package installer? – JdeBP Apr 21 '18 at 09:06

2 Answers2

11

At the core, there is no difference between Shutdown or Reboot, with regards to the "System Restart Required" message. Both a shutdown and a reboot will clear it. However, this only applies when you don't have a new pending update that requires a reboot to completely apply, and automatic updates could run on your system since the 'last reboot' you mentioned.

As such, you need to be mindful of whether your system has unattended-upgrades installed and enabled. If this is the case, your system gets updates once a day or so, and if you have automatic updates set up to install all available updates (not just security-only updates), then it will autorun and autoinstall updates at its configured time point. The best way to determine that is to look at /var/log/apt/history.log, where automatic updates will show up. This can explain an 'unexpected' "Restart Required" message because since the last reboot your system might have gotten new updates that triggered the message.

Thomas Ward
  • 2,698
2

Never mind.

"tail /var/log/apt/history.log"
shows an automatic update this morning at 6am.

So I apparently have automatic updates on, and the timing was just really tight.

  • 1
    I didn't see this answer, whoops. Serves me right for trying to answer while on my phone and not my computer (oops). – Thomas Ward Apr 20 '18 at 16:34