Il trittico

Il trittico (The Triptych) is the title of a collection of three one-act operas, Il tabarro, Suor Angelica, and Gianni Schicchi, by Giacomo Puccini. The work received its world premiere at the Metropolitan Opera on 14 December 1918.

Source: Il trittico – Wikipedia

Il trittico was last modified: September 25th, 2017 by Jovan Stosic

package management – How can I tell, from the command line, whether the machine requires a reboot? – Ask Ubuntu

When you install certain updates (e.g. a new kernel) in Ubuntu Desktop, you get an indication that a reboot is required (in Lucid, the logout icon turns red).

How can I check, from the command line, whether an Ubuntu server requires a reboot?

I could grep for ‘System restart required’ in /etc/motd, but I’d like a solution that’s more elegant. Also, I want a solution that works in older releases, e.g. Hardy (8.04 LTS).

shareimprove this question
If you are maintaining server you will soon also develop sense wether or not update require restart. Most updates needs no restart or only restart of service (witch it should do automatically). – eXlin Nov 18 ’10 at 11:45

7 Answers

up vote199down voteaccepted

You can simply check if the file /var/run/reboot-required exists or not.

For example, any of these would tell you “no such file” or “file not found” if you do not need to reboot, otherwise (if you need to reboot) the file would exist and these commands would show information about the file:

file /var/run/reboot-required
stat /var/run/reboot-required
ls /var/run/reboot-required

In a bash script, you can use:

#!/bin/bash
if [ -f /var/run/reboot-required ]; then
  echo 'reboot required'
fi
shareimprove this answer
1
This works, and it works on Hardy too. (Doesn’t work on Dapper — 6.06 — which I still have on one machine. Tough.) Incidentally, the /var/run/reboot-required file is created by /usr/share/update-notifier/notify-reboot-required which is invoked from various packages’ maintainer scripts. – Marius Gedminas Jul 29 ’10 at 14:23
1
It would work on Dapper too if I installed the update-notifier package, except that it wants to pull down 120 megs’ worth of GNOME stuff into my ancient server. – Marius Gedminas Jul 29 ’10 at 14:27
9
Better install update-notifier-common, it doesn’t depend on any GUI stuff (but doesn’t exist for Dapper). – Marius Gedminas Jul 29 ’10 at 14:35
1
FWIW, update-notifier-common is not installed on Lucid server by default. – Marius Gedminas Jul 29 ’10 at 14:37
1
Thanks! and the file /var/run/reboot-required.pkgs will list the packages that require the reboot.– nealmcb Feb 22 ’15 at 17:21

In the package debian-goodies is a command named checkrestart which is quite useful. Its output can help you avoid a full reboot.

shareimprove this answer
How can it make me avoid a full reboot? – Oxwivi Sep 9 ’11 at 15:03
8
It tells you, which running applications have loaded shared libraries that were upgraded while the application was running. You then restart the applications and services manually and avoid a full reboot. Does not help with kernel upgrades, though. – aquaherd Sep 15 ’11 at 20:38
This should be the top answer. Very helpful. OpenSUSE got a tool built-in (and also helps you how can you run it). Shame Ubuntu just goes “restart, restart”. For example colord needed a restart here. Hence, no need to restart. – Shiki Mar 11 ’13 at 14:22

Normally if the file

/var/run/reboot-required 

exists you should reboot. You can see if this file is there by using this simple command in gnome-terminal.

ls /var/run/reboot-required
shareimprove this answer

Aswell as the most direct methods written by others there is a handy indication if you use byobu – a set of scripts to make GNU screen a little more user friendly. It shows a set of information at the bottom of the screen, and that can include whether a reboot is required – along with whether updates are available, the time, uptime, memory used …

In this screenshot you can see from the 199! on the bottom line with the red background that there are 199 updates available, and the ! means that some are security updates. The menu in the foreground is selecting which status notifications should be displayed.

If a reboot is required then this will be indicated by the symbol (R) displayed in the lower bar with white text on a blue background. More details and other indicators can be read about in thebyobu man page.

byobu screenshot

shareimprove this answer

The /etc/motd file gets its information about whether a reboot is required from /var/run/reboot-required file.

You can check the content of this file in terminal by using cat /etc/motd command

shareimprove this answer

If you have the reboot-notifier or update-notifier-common packages installed, then you get the files /var/run/reboot-required and /var/run/reboot-required.pkgs

reboot-notifier is newer in Ubuntu Wily and Xenial. Debian stretch, but in jessie-backports

update-notifier-common Is older, in all Ubuntu versions including Xenial and Debian Wheezy. Not in Debian Stretch or Jessie.

( There is some background to the reboot-notifier package athttps://feeding.cloud.geek.nz/posts/introducing-reboot-notifier/ )

If you don’t have these packages installed then you can compare the version of the linux package installed, with the version running:

tim@tramp:~$ dpkg -l linux-image-*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                              Version               Architecture          Description
+++-=================================-=====================-=====================-=======================================================================
ii  linux-image-3.16.0-4-amd64        3.16.7-ckt20-1+deb8u4 amd64                 Linux 3.16 for 64-bit PCs
ii  linux-image-amd64                 3.16+63               amd64                 Linux for 64-bit PCs (meta-package)
tim@tramp:~$ more /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian <b>3.16.7-ckt20-1+deb8u3</b> (2016-01-17)

You can see here that the latest installed kernel is 3.16.7-ckt20-1+deb8u4 but the kernel running is 3.16.7-ckt20-1+deb8u3. So this system needs a reboot. The u4 vs u3 right at the end.

You might need to scroll the box above. In the /proc/version, it is the version near the end of the line that matters.

The very minor version code change is typical of a Debian security kernel update

Source: package management – How can I tell, from the command line, whether the machine requires a reboot? – Ask Ubuntu

package management – How can I tell, from the command line, whether the machine requires a reboot? – Ask Ubuntu was last modified: July 13th, 2017 by Jovan Stosic

Why is “No new release found” when upgrading from a LTS to the next? – Ask Ubuntu

I’m following the upgrade instructions on Ubuntu’s website, but on launching the upgrade tool I get this response:

Checking for a new ubuntu release
No new release found

Am I doing something wrong? Is there a workaround?

Here’s my /etc/lsb-release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
shareimprove this question
1
There’s a really good answer by Jorge Castro. Why not mark it accepted? – fluffy Jul 7 ’16 at 9:38

4 Answers

According to Ubuntu Engineering Foundations team manager Steve Langasek:

Upgrades between LTS releases are not enabled by default until the first point release, 14.04.1, scheduled for July. It is recommended that most LTS users wait until then before upgrading to 14.04.

If you choose to upgrade before then, you can pass the -d option to the upgrade tool, running do-release-upgrade -d or update-manager -d, to upgrade from vanilla 12.04 to 14.04. (-d stand for devel)

This question explains the justification for waiting for the prompt.

shareimprove this answer
6
Why, then, is do-release-upgrade (without the -d) still saying “No new release found” a few days after the .1 has been released in iso form? (My /etc/update-manager/release-upgrades says “Prompt=lts”) – tudor Aug 1 ’14 at 1:00
5
From an inspection of the code, it seems that “normal” releases default to a URLchangelogs.ubuntu.com/meta-release which lists 14.04, and LTS releases use the URLchangelogs.ubuntu.com/meta-release-lts which doesn’t list it at all. I think they haven’t updated the meta information yet. – tudor Aug 1 ’14 at 1:28
2
That seems like a release oversight, can you file a bug and CC me? email is in my profile, thanks! – Jorge Castro Aug 1 ’14 at 3:20
1
@JorgeCastro Is this indeed a release oversight, and is there any idea when it will be fixe? Was a bug filed, and where can I follow it? (I searched, but could not find it. I also want to switch from 12.04 LTS to 14.04.1 LTS, and I just want to do it through the Update Manager.) – Marnix Klooster Aug 9 ’14 at 7:12
1

If one has no access to a GUI and wants the update on terminal:

  1. Edit
    /etc/update-manager/release-upgrades
    

    to match either normal or lts. (See list below what fits your case, be aware that you can only upgrade an lts to another lts version):

    [DEFAULT]
    Prompt=normal
    
  2. Test correct version is found, run
    do-release-upgrade -c
    
  3. Upgrade in case correct version is shown:
    sudo do-release-upgrade -d
    

That way I could upgrade a 12.04 to 12.10.

For the release-upgradesPrompt option never, normal, and lts are the available options:

  • never – Never check for a new release.
  • normal – Check to see if a new release is available. If more than one new release is found, the release upgrader will attempt to upgrade to the release that immediately succeeds the currently-running release.
  • lts – Check to see if a new LTS release is available. The upgrader will attempt to upgrade to the first LTS release available after the currently-running one. Note that this option should not be used if the currently-running release is not itself an LTS release, since in that case the upgrader won’t be able to determine if a newer release is available.
shareimprove this answer
2
I had a similar issue. I simply changed from Prompt=normal to Prompt=lts and it worked just fine for me. – Florin Coada Sep 9 ’14 at 10:48

sudo do-release-upgrade -d 

Notice the -d at the end.

Source: Why is “No new release found” when upgrading from a LTS to the next? – Ask Ubuntu

Why is “No new release found” when upgrading from a LTS to the next? – Ask Ubuntu was last modified: July 13th, 2017 by Jovan Stosic

Inferno (2016)

Directed by Ron Howard. With Tom Hanks, Felicity Jones, Irrfan Khan, Ben Foster. When Robert Langdon wakes up in an Italian hospital with amnesia, he teams up with Dr. Sienna Brooks, and together they must race across Europe against the clock to foil a deadly global plot.

Source: Inferno (2016) – IMDb

Inferno (2016) was last modified: September 25th, 2017 by Jovan Stosic

Alejandro Jodorowsky

Alejandro Jodorowsky Prullansky (Spanish: [aleˈxandɾo xoðoˈɾofski]; born 17 February 1929)[1][2][3]is a Chilean[4][5]-French film and theatre director, screenwriter, playwright, actor, author, poet, producer, composer, musician, comics writer, and spiritual guru. Best known for his avant-garde films, he has been “venerated by cult cinema enthusiasts” for his work which “is filled with violently surrealimages and a hybrid blend of mysticism and religious provocation”.[6]

Born to Jewish-Ukrainian and Polish parents in Chile, Jodorowsky experienced an unhappy and alienated childhood, and so immersed himself in reading and writing poetry. Dropping out of college, he became involved in theater and in particular mime, working as a clown before founding his own theater troupe, the Teatro Mimico, in 1947. Moving to Paris in the early 1950s, Jodorowsky studied mime under Étienne Decroux before turning to cinema, directing the short film Les têtes interverties in 1957. From 1960 he divided his time between Paris and Mexico City, in the former becoming a founding member of the anarchistic avant-garde Panic Movement of performance artists. In 1966 he created his first comic strip, Anibal 5, while in 1967 he directed his first feature film, the surrealistFando y Lis, which caused a huge scandal in Mexico, eventually being banned.

His next film, the acid western El Topo (1970), became a hit on the midnight movie circuit in the United States, considered as the first-ever midnight cult film, garnering high praise from John Lennon, which led to Jodorowsky being provided with $1 million to finance his next film. The result was The Holy Mountain (1973), a surrealist exploration of western esotericism. Disagreements with the film’s distributor Allen Klein, however, led to both The Holy Mountain and El Topo failing to gain widespread distribution, although both became classics on the underground film circuit.[6]

After an aborted attempt at filming Frank Herbert‘s 1965 science fiction novel Dune, Jodorowsky produced three more films, the family film Tusk (1980), the surrealist horror Santa Sangre (1989), and the failed blockbuster The Rainbow Thief (1990). Meanwhile, he has simultaneously written a series of science fiction comic books, most notably The Incal (1980–1989), which has been described as having a claim to be “the best comic book” ever written,[7] and also The Technopriests and Metabarons. Accompanying this, he has also written books and regularly lectures on his own spiritual system, which he calls “psychomagic” and “psychoshamanism” and which borrows from his interests in alchemy, the tarot, Zen Buddhism and shamanism.[8] His son Cristóbal has followed his teachings on psychoshamanism; this work is captured in the feature documentary Quantum Men, directed by Carlos Serrano Azcona.

Source: Alejandro Jodorowsky – Wikipedia

Alejandro Jodorowsky was last modified: September 25th, 2017 by Jovan Stosic