PuTTY Ubuntu Login

This short article goes through the commands required to upgrade to the latest trusted distribution of Ubuntu 14.04 Long Term Support (LTS) but the same commands can be used for any Ubuntu upgrade.

The following example shows the commands and actions for upgrading all of the packages on Ubuntu to their latest distributed versions rather than just applying updates to currently installed packages.

The first thing to do is login using your Command Line Interface (CLI). You will probably login with an account that does not have upgrade privileges. You can either run the command “sudo -i” to switch to a privileged account or you can prefix the commands with the word “sudo”, which is safest.

In all my other examples I will do it the safe way but for this we will run everything from privileged root account.

Not only do I want to upgrade to the latest package for each of the components I have installed but I know there is a later distribution of 14.04.4 (i.e. 92) so I’ve highlighted that in the screenshots.

After “sudo -i” the commands are “apt-get update” to search for the latest distribution of each package and then “apt-get dist-upgrade” to force an upgrade wherever possible adding or removing where necessary to intelligently upgrade as much as possible. The “apt-get upgrade” command only upgrades to the latest version of packages already installed and doesn’t seek out the later packages that are available.

Upgrading Ubuntu 1

If there are any changes to be made you will need to enter “Y” when prompted to apply them.

Upgrading Ubuntu 2

After upgrading you need to “reboot”.

Upgrading Ubuntu 3

When you connect again you can see that you have the latest packaged distribution of Ubuntu if you used the “apt-get dist-upgrade” command.

Upgrading Ubuntu 4

You should always “apt-get update” before “apt-get upgrade” or “apt-get dist-upgrade” so that the information about the latest packages available is listed in “/etc/apt/sources.list”. The “apt-get upgrade” or “apt-get dist-upgrade” commands use this list to determine what needs to be upgraded. If you want to upgrade to the latest version of Ubuntu then the you will use the command “apt-get do-release-upgrade” to go from say 14.04 to 16.04.

Related articles

This is part of a series of short articles covering setting up and maintaining a multiple domain web hosting environment using an Ubuntu Linux server. You can find an up-to-date list of those from the Hosting – Ubuntu category.

Upgrading packages on Ubuntu from the command line

Leave a Reply