Community Blog How to Change and Update Your Ubuntu Server on Alibaba Cloud

How to Change and Update Your Ubuntu Server on Alibaba Cloud

This article explains how to update your Ubuntu server on Alibaba Cloud.

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.

Supported Ubuntu Versions

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.

Back up Your Data

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.

Free Disk Space

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

Check Your System Version

You need to check your system version. In our case, it's the 18.04 LTS release:


Update the Installed Packages

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 

Upgrade Ubuntu 18.04 to Ubuntu 20.04

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:


Why Should You Update Your System?

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.

0 0 0
Share on

Alibaba Cloud Community

564 posts | 54 followers

You may also like