By Alain Francois
Ubuntu is a Linux system well known for ease of use as it is popular on both desktop and servers editions. Upgrading your Ubuntu version from an older version to the latest version is one of the best features of Ubuntu. We recommend upgrading Ubuntu regularly to benefit from the latest security patches.
This article will explain how to update your Ubuntu Server on Alibaba Cloud step-by-step.
Alibaba Cloud only offers Ubuntu Server LTS (Long Term Support) editions from 14.04, which means they offer Ubuntu 14.04, 16.04, 18.04, and 20.04.
Upgrades are normally safe, but there is always a chance something may go wrong. It is important to back up your data before processing. You can back up your data manually or use Alibaba Cloud Hybrid Backup Recovery.
You can also create a snapshot of the disk. To do so, log on to the ECS console and choose Instances & Images and Instances on the left-side navigation pane:
Find the instance whose disk you want to resize and click the instance ID:
On the Instance Details page, click the Cloud Disk tab. Then, select the disk you want to resize and click Create Snapshot in the Actions column:
Then, enter a snapshot name, specify tags, and click Create:
Now that your snapshot is created, you can update your systems.
Your computer needs sufficient free disk space for the system update. You need a minimum of 2-3 GB of free disk space on your root partition for the best experience. You can use the
df command to check your system's free space:
$ sudo df -h
You need to check your system version. In our case, it's the 18.04 LTS release:
Update to the latest versions of all packages for the current release:
$ sudo apt update
Upgrade the installed packages to their latest available versions:
$ sudo apt upgrade
You will use the
do-release-upgrade command to start the upgrade process. The command checks for new releases and updates the sources.list files and a range of other tasks:
$ sudo do-release-upgrade
If you're connected to your system over SSH, you'll be asked whether you wish to continue since losing your SSH connectivity is a risk. The command will start a new instance of
sshd on port 1022:
It will let you know that it needs to rewrite the sources.list file:
It will prompt some other confirmation information, and the process will take some time. Later, it will ask if you want to restart the services automatically. If you want to go through a manual process, you may be asked to replace a configuration file that you have modified. You will need to know your configurations and the services:
After the process finishes, it will ask to restart:
After the restart, verify that it is the new version:
Ubuntu guarantees LTS releases will receive security updates, other bug fixes, and hardware support improvements. The LTS versions are considered the most stable releases, which undergo extensive testing, including years of improvements along the way. LTS releases are maintained for a minimum of five years of software and security updates.
On a system with critical data, you may wish to inspect every detail during the update process. Ubuntu 20.04 LTS (Focal Fossa) is the latest Ubuntu LTS release with security patches and updates available until 2025.
Hiteshjethva - October 31, 2019
francisndungu - May 29, 2019
Alibaba Clouder - September 30, 2017
Hiteshjethva - March 2, 2020
francisndungu - October 9, 2018
Hiteshjethva - May 29, 2021
High-performance virtual machines with data transfer plan, starting from $2.50 per monthLearn More
Take advantage of the cost effectiveness, scalability, and flexibility of Alibaba Cloud's infrastructure and services, as well as the proven reliability of Red Hat Enterprise Linux and Alibaba Cloud's support backed by Red Hat Global Support Services.Learn More
Secure and easy solutions for moving you workloads to the cloudLearn More
More Posts by Alibaba Cloud Community