Files
vault-para/000-inbox/clippings/2024/09/How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step).md
2025-12-29 13:38:39 +08:00

164 lines
11 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
page-title: "How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step)"
url: https://cloudinfrastructureservices.co.uk/how-to-upgrade-ubuntu-from-20-04-to-22-04-step-by-step/
date: "2024-09-11 15:27:35"
---
How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step). In this post, we show you how to upgrade Ubuntu from 20.04 to 22.04.
[Ubuntu 22.04 LTS](https://releases.ubuntu.com/jammy) also called Jammy Jellyfish was released on April 21, 2022, by [Canonical](https://canonical.com/). It is also long term support version and supported until April 2027. Ubuntu 22.04 comes with a new enhancement, a number of software packages, and some powerful features that make your life easier.
- PHP 8.1.2
- Python 3.10.4
- [MySQL](https://cloudinfrastructureservices.co.uk/how-to-setup-mysql-server-phpmyadmin-on-linux-in-azure-aws-gcp/) 8.0.28
- OpenSSL 3.0
- Linux kernel v5.15.0-25 & MESA 22
- Ruby 3.0
- [PostgreSQL](https://cloudinfrastructureservices.co.uk/how-to-setup-install-postgresql-server-on-azure-aws-gcp/) 14.2
## New Features in Ubuntu 22.04
Ubuntu 22.04 comes with many useful features and changes. Some of them are listed below:
- **GNOME 42** Ubuntu 22.04 comes with the latest [GNOME 42](https://release.gnome.org/42/) version with a user-friendly interface and several customize options. It also comes with a new screenshot tool for both video recording of desktop and screencast.
- **Dock Mode** This feature allows you to change the size of the dock as per your need. Also use it with auto hide feature.
- **Multitasking Setting** With this new feature, you dont need any GNOME tweak tool to access this setting. You can easily enable hot corners using this feature.
- **Desktop Icons** In this feature, the position of the new desktop icons is now in the bottom right corner.
- **Control Mounted Device** This feature allows you to control the behaviour of mounted drives in the dock. Show or hide the mounted device as per your requirement.
- **Multimonitor settings** This feature only supports two monitor setup only. It allows you to get the option to join displays, mirror them or use only one of them.
- **Raspberry Pi Support** Ubuntu 22.04 desktop version is now supported on Raspberry Pi devices. However, it can work only on 8 GB [Raspberry Pi](https://www.raspberrypi.org/) version.
- **Native RDP support** Ubuntu 22.04 comes with Remina software pre-installed. Use this tool to connect Windows system via [RDP protocol](https://cloudinfrastructureservices.co.uk/how-does-remote-desktop-protocol-work-rdp-protocol-explained/).
## Types of Upgrade
There are two methods to upgrade to Ubuntu 22.04 version. The clean upgrade method and inline upgrade method.
### Clean Upgrade
In this method, you will need to download the Ubuntu 22.04 [ISO](https://www.iso.org/home.html) image from their official download page, then boot your system from the ISO. Following that you need to format your existing installation and then install the newer version of Ubuntu on your system. Advice: this method is not suitable, because you need to backup all your configuration file and reinstall all necessary software on the new system.
### Inline Upgrade
In this method, you upgrade your existing system without losing any configuration files and reinstalling applications. Perform an [inline upgrade](https://cloudinfrastructureservices.co.uk/ubuntu-vs-linux-whats-the-difference/) via GUI or CLI method. This method downloads and installs all packages and a new releases of the operating system on the same system. Compared to a clean upgrade, this method is the fasted method to perform the upgrade.
## How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step)
[![How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/elementor/thumbs/How-to-Upgrade-Ubuntu-from-20.04-to-22.04-Step-by-Step-q4629ljkvs8gi6gveokdul6tvp78mnf5gxpy9px470.png "How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step)")](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/How-to-Upgrade-Ubuntu-from-20.04-to-22.04-Step-by-Step.png)
In this section we navigate you through steps how to upgrade from Ubuntu 20.04 to Ubuntu 22.04.
### Prerequisites
Before you start with the system upgrade process, please check the following requirements. If anything missing from the below list, you must implement it before the upgrade process.
- A root user or a user with sudo privileges is configured on your server with [SSH access](https://cloudinfrastructureservices.co.uk/vpn-vs-ssh-whats-the-difference/).
- Minimum 20 GB of free disk space available on your system.
- Fast and stable internet connection to perform the upgrade.
- Close all running applications.
### Backup Your Important Data
Before upgrading your system, it is always recommended to backup your files and directory and place them in a safe location. So if your upgrade process failed then you dont worry about losing your data. If your server is hosted on the [VPS](https://www.ibm.com/in-en/topics/vps) or VM then create a [snapshot](https://snapshot.org/) of your VM to VPS. So that you can restore it easily in the event of a failed upgrade.
### Update and Upgrade Existing Packages
First, get a list of all packages that needs upgrade using the following command.
Next, update the system package cache using the following command.
Now, upgrade all the packages to the latest version with the following command.
This will take some time to upgrade all the packages to the latest version. After the successful upgrade, restart your system to use the latest kernel that comes with the new upgrade.
Next, remove all unwanted packages, dependencies and cache with the following command.
Once you are done, please proceed to the next step.
### Verify the Existing Server Version
You also need to verify your existing server version. Easily upgrade it to the newer version. First, get a list of all upgradable packages using the following command.
[![check ubuntu 20.04 version](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/check-ubuntu-20.04-version-768x159.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/check-ubuntu-20.04-version.png)
### Allow Port 1022 Through UFW
By default, [SSH](https://www.ucl.ac.uk/isd/what-ssh-and-how-do-i-use-it) uses port 22. However, during the upgrade process, Ubuntu starts the SSH service on port 1022. Connect to your server via SSH if anything goes wrong.
If you are using the [UFW](https://help.ubuntu.com/community/UFW) [firewall](https://cloudinfrastructureservices.co.uk/top-15-best-open-source-firewalls-for-linux-windows/) and upgrading your server via SSH connection then you will also need to allow port 1022 via UFW. Allow port 1022 with the following command.
Then, reload the UFW firewall to apply the changes.
Once you are done proceed to the next step.
## Upgrade Ubuntu 20.04 to Ubuntu 22.04
First, install the update-manger-core package on your system with the following command.
```
apt install ubuntu-release-upgrader-core -y
```
Then, start the upgrade process with the following command.
If there is not any latest version available then you should see the following screen.
[![error getting upgrade release](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/error-getting-upgrade-release-768x97.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/error-getting-upgrade-release.png)
Otherwise, you will be notified that an additional SSH service will be started on port 1022. Simply type Y and press ENTER to proceed.
[![ssh service notice](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/ssh-service-notice-768x243.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/ssh-service-notice.png)
Type **Y** and press the **Enter** key to continue. You should see another message. Just press the **Enter** key. You will see the installation summary.
[![How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step) installation summary](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/installation-summary-768x211.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/installation-summary.png)
Type **Y** and press the **Enter** key to start downloading packages needed for the upgrade. After some time, you will be prompted “if you would like your servers services to be restarted automatically throughout the upgrade”
[![restart service notice](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/restart-service-notice-768x275.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/restart-service-notice.png)
Type **Y** and press the **Enter** key to continue the upgrade. You will be asked to select the keyboard.
[![select keyboard](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/select-keyboard-768x386.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/select-keyboard.png)
Select your country of origin for the keyboard and press the **Enter** key. You will be asked to select the keyboard layout.
[![select keyboard layout](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/select-keyboard-layout-768x408.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/select-keyboard-layout.png)
Choose your keyboard layout and press the Enter key. You will be asked “whether you wish to preserve these or replace them with the new configuration files included with Ubuntu 22.04”
[![keep current configuration](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/keep-current-configuration-768x145.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/keep-current-configuration.png)
Select your preferred option and press the **Enter** key. You will be asked to remove the obsolete packages from your server.
[![remove obsolete packages](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/remove-obsolete-packages-768x168.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/remove-obsolete-packages.png)
Type **Y** and press the **Enter** key to confirm. Once the upgrade process is complete successfully, you will be asked to reboot your system on see the following screen.
[![How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step) reboot the system](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/reboot-the-system-768x105.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/reboot-the-system.png)
Just, type **Y** and press the **Enter** key to restart your system.
At this point, your server is upgraded from Ubuntu 20.04 to Ubuntu 22.04. Now verify the upgraded system version. Run the following command to verify the newer version.
You should see the following screen.
[![verify ubuntu upgrade](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/verify-ubuntu-upgrade-768x93.png)](https://net.cloudinfrastructureservices.co.uk/wp-content/uploads/2023/03/verify-ubuntu-upgrade.png)
## How to Upgrade Ubuntu from 20.04 to 22.04 (Step by Step) Conclusion
Congratulations! Your Ubuntu is now upgraded to Ubuntu 22.04. Explore and enjoy new features that come with Ubuntu. Also, investigate your application configuration file and services whether all are working fine or not.