What is the command line equivalent for the update manager (Software Updater)?
As Flimm commented, the answer really is sudo apt-get dist-upgrade
(after running sudo apt-get update
, which GUI package management tools automatically do the equivalent of). That is at least the closest thing to running the Software Updater (called Update Manager in older releases).
Running apt-get upgrade
will upgrade packages that can be upgraded:
- without installing any packages that aren't already installed in some version, and
- without removing any packages.
The Update Manager is capable of doing both these things, so apt-get dist-upgrade
is quite close to it.
- Running
sudo apt-get dist-upgrade
will not, by itself, upgrade your Ubuntu system to a newer release. In fact, unlike in Debian,apt-get dist-upgrade
is not a supported way to upgrade to a new release. In Debian (and in Ubuntu, though it may sometimes fail and is unsupported), changing all the repositories listed in/etc/apt/sources.list
to the repositories for the next release and runningsudo apt-get dist-upgrade
will attempt to upgrade to the next release.
Because apt-get dist-upgrade
can remove package (and install new packages you might not want), it's always best to look through the description of what it intends to do before pressing y.
So while running sudo apt-get -y upgrade
is usually reasonable, the -y
flag should rarely be used with dist-upgrade
.
The reason you don't get new kernel versions with sudo apt-get upgrade
is because they each are provided by separate, differently named packages. (The kernel version is part off the name.) This is to facilitate keeping an old kernel installed alongside a newer kernel (and being able to select between them in the GRUB menu).
The automatic offering of new kernel packages for installation is accomplished by having a metapackage (like linux-image-generic
) installed. When a new kernel comes out for your Ubuntu release, your kernel metapackage is upgraded and the upgraded version fo that metapackage lists the new kernel as a dependency (without preventing the old kernel from continuing to be installed).
If you don't want to use sudo apt-get dist-upgrade
, then you can always manually upgrade the individual packages that are listed as held back when you ran sudo apt-get upgrade
. To do this, "install" them: sudo apt-get install packagename
.
If you're looking to open the software update window from the command line (which is what I gathered you were getting at, mostly because that's why I searched for this and ended up here as that is my goal) in order to give yourself root access to the GUI window (I had a permission issue trying to do this from remoting in)
sudo update-manager
I just found this answer but lost the source so I can't credit it...
The below command will install the package that has the kernel as a dependency and so will update your kernel choosing the right one to do it with.
My 14.4 install had been upgraded to 14.10 except the kernel. In my case, the kernel updated from 3.13.x to 3.16.x although it is possible that the 3.13.0.x versions may have had updates. Apparently 3.13 wasn't an LTS kernel though.
sudo apt-get install linux-image-generic