This tutorial post will show you how to upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS with step by step procedure.

Upgrade Ubuntu 18.04 to ubuntu 20.04
Upgrade Ubuntu 18.04 to ubuntu 20.04

Table of Contents

How to Upgrade Ubuntu 18.04 to Ubuntu 20.04

Upgrading Ubuntu system can be done through either Graphical User Interface (GUI) or Command Line (CLI).

Prerequisites for upgrading Ubuntu System

  1. Stable Internet connection required.
  2. Make sure you have taken the whole system backup to avoid unneccessary issues.
  3. Sudo access to perform Ubuntu OS upgrade.

Prepare the Ubuntu System for Upgrade

Before starting the actual Ubuntu Upgrade, Lets do few checks and prepare the system ready to upgrade Ubuntu.

use lsb_release command or view /etc/lsb-release file to confirm the current Ubuntu OS Version as below.

[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

Above command clearly shows that our current Ubuntu OS version is Ubuntu 18.04.

Lets prepare our Ubuntu Server for the Upgrade.

Use apt-get command to update and upgrade the currently installed packages.

[email protected]:~$ sudo apt update
[email protected]:~$ sudo apt upgrade -y

Above upgrade command will roughly download 300Mb of Packages and it will take time that completely depends on your internet bandwidth.

It may prompt you to provide language selection, keyboard layout detects and other required details to complete the upgrade process.

If any important packages are getting upgraded, it will ask for the confirmation to restart the services or not. its upto you, you can select “Yes” to restart service during the upgrade or Select “No” to ignore it.

Once the upgrade process is completed, Reboot the Ubuntu server.

[email protected]:~$ sudo reboot

Now remove Kernels that is not in use and install update-manager-core as given below.

[email protected]:~$ sudo apt --purge autoremove
[email protected]:~$ sudo apt install update-manager-core -y

Upgrade Ubuntu

Lets use the command do-release-upgrade to check the available Ubuntu OS Version to upgrade.

[email protected]:~$ sudo do-release-upgrade -c
Checking for a new Ubuntu release
New release '20.04.4 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
[email protected]:~$

In the above command output, it is confirmed that we have new ubuntu release 20.04.4 LTS version is available to upgrade. So lets start the Ubuntu upgrade using the same command without any option.

Before get started, you can also use “-d” option to check any development version is available for upgrade as below.

[email protected]:~$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.

Lets start upgrading Ubuntu 18.04 to Ubuntu 20.04.

[email protected]:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]
Get:2 Upgrade tool [1,335 kB]
Fetched 1,336 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'
Get:57 focal-backports/main amd64 c-n-f Metadata [864 B]
Get:58 focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:59 focal-backports/universe i386 Packages [12.9 kB]
Get:60 focal-backports/universe amd64 Packages [22.7 kB]
Get:61 focal-backports/universe Translation-en [15.5 kB]
Get:62 focal-backports/universe amd64 c-n-f Metadata [808 B]
Get:63 focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 32.0 MB in 6s (97.3 kB/s)
Do you want to start the upgrade? y
19 installed packages are no longer supported by Canonical. You can
still get support from the community.
3 packages are going to be removed. 152 new packages are going to be
installed. 448 packages are going to be upgraded.
You have to download a total of 383 M. This download will take about
9 minutes with your connection.
Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.
 Continue [yN]  Details [d] y
Purging configuration files for libpython3.6-minimal:amd64 (3.6.9-1~18.04ubuntu1.7) ...
Purging configuration files for linux-modules-4.15.0-20-generic (4.15.0-20.21) ...
Purging configuration files for python3.6-minimal (3.6.9-1~18.04ubuntu1.7) ...
System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Continue [yN] y

Ubuntu upgrade steps are completed now. After entering “Y” in the last step, server will be rebooted.

Once the Ubuntu Server is up, check your Ubuntu OS Version using lsb_release command. It must be Ubuntu 20.04 now.

[email protected]:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

Hope this tutorial post helped you to understand How to upgrade Ubuntu from 18.04 to 20.04 with step by step procedure.

If you are interested in learning, Request you to go through the below recommended tutorial.

DevOps Full Course Tutorial for Beginners – DevOps Free Training Online
Docker Full Course Tutorial for Beginners – Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners – Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners – Ansible Free Training Online
Openstack Full Course Tutorial for Beginners – Openstack Free Training Online

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

YouTube | Facebook | Twitter | Pinterest | Telegram