Prerequisites
- You have an Ubuntu 16.04 system with access to a sudo enabled user.
- Backup all critical data from the system to a remote location using a utility program like
rsync
. Even better, take a complete snapshot of your system. - Make sure the SSH connection does not drop while the upgrade process is running. You can use a small utility program called
screen
to prevent the session from “timing out” or disconnecting. If there is any SSH connectivity failure during the upgrade process, you can reconnect to the session usingscreen
. - Don’t run the upgrade procedures in a production system. If you are keen to upgrade in a production system, first test all your software and apps against the upgrade in a staging environment.
Step 1. Update the installed packages
Before you begin the release upgrade process, update all your existing packages to the latest versions. Issue the following command to check the current release version of your system:$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
Update the list of available packages and their versions with the following command:
$ sudo apt-get update
Now, install the newer versions of these packages:
$ sudo apt-get upgrade
After upgrading the packages, check the Ubuntu’s release number. You will find that your distribution of Ubuntu 16.04 is upgraded. In our case, it upgraded to Ubuntu 16.04.4 LTS
.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
The primary purpose of upgrading packages to the latest release is to keep the difference between your installed packages and the new ones in Ubuntu 18.04 as small as possible. Smaller differences minimize the risk of potential errors during the process.
Step 2. Upgrade Ubuntu
The official recommended upgrade procedure uses a tool calleddo-release-upgrade
. This tool is a part of update-manager-core
package and is installed by default.
If for some reasonContinue reading this article
by subscribing to our newsletter.
Subscribe nowby subscribing to our newsletter.
A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.
If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.