How to Upgrade Ubuntu to Ubuntu 22.04?


Ubuntu’s release cycle comprises rolling releases (for testing) and LTS. The LTS version comes after every 2 years and is supported for the next five years. The current LTS of Ubuntu is Ubuntu 22.04 (Codenamed Jammy Jellyfish) and the next (upcoming) LTS is Ubuntu 24.04. Ubuntu offers easy ways to install fresh copies of these LTS to upgrade your system. However, if you do not install a fresh copy of the LTS but want to switch to the latest available LTS (22.04 when writing this guide)? Is this possible? Yes, of course, you can easily upgrade your Ubuntu to the latest available LTS.

This particular guide will list the methods to upgrade Ubuntu to Ubuntu 22.04.

 

How to Upgrade Ubuntu to Ubuntu 22.04?

Ubuntu has a core utility named “update-manager”, which assists you in upgrading your Ubuntu to Ubuntu 22.04 through CLI and GUI. Thus, you can use the CLI or a GUI to upgrade to Ubuntu 22.04.

 

Upgrade Ubuntu to Ubuntu 22.04 Using CLI | For Ubuntu Server and Ubuntu Desktop

To manage the upgrade effectively via CLI, the update manager must be installed and configured properly on your system. Let’s start the upgrade procedure with the installation/configuration of the update manager:

Prerequisites: Install and Configure Update Manager

First, install the update manager (if your system does not have it already). The package named “update-manager-core” actually extends the functionality of the normal update/upgrade process:

sudo apt update;sudo apt install update-manager-core

Let’s Proceed With the Configuration:

The settings of the update manager reside in the file “/etc/update-manager/release-upgrades”. Let’s check its content, first:

sudo cat /etc/update-manager/release-upgrades

In this file, there is a parameter named “Prompt” on which the upgrade prompt of the system depends, where:

  • “Prompt=lts”: shows the LTS to LTS upgrade only.
  • “Propmt=normal”: denotes all the latest releases to which the system can be upgraded.
  • “Prompt=never”: you won’t get any upgrade prompt.

Right now, our system is configured to upgrade to only LTS, which is our ultimate goal in this article.

Note: You can open this file in the editing mode to perform any changes.

Let’s check out both ways, updating from an LTS or an interim release.

Step 1: Verify the Current Version Distribution

lsb_release -a

Step 2: Update the System’s Repositories/Core Libraries

Before you upgrade the OS, it is necessary that your system repositories/core libraries are updated and upgraded:

sudo apt update;sudo apt upgrade

Step 3: Upgrade Ubuntu to Ubuntu 22.04

Now, you are all set to upgrade your system to Ubuntu 22.04. Use the following command to do so:

sudo do-release-upgrade

The first prompt appears about updating the Firefox snap, choose “OK” to proceed:

The next prompt is about the configuration of the “/etc/sudoers” file. Choose “Y” to set it up with the new installation or “N” to keep the previous one (recommended):

Meanwhile, your Desktop background would have been changed to the “Jammy Jellyfish”. Next, you will be asked to whether remove the unused packages or keep them:

Here you go! Press “Y” to complete the updating process:

You are into the Ubuntu 22.04. Let’s verify the OS version via the “hostnamectl” command:

hostnamectl

That’s how you can upgrade Ubuntu to the Ubuntu 22.04.

 

Upgrade Ubuntu to Ubuntu 22.04 Using GUI | For Ubuntu Desktop Only

For a GUI method, we also have to access the update manager in the Software Updater. First, open the “Software & Updates” application. Go to its “Updates” tab and mark the highlighted options (subscribe to all the updates and turn on the notifications of LTS versions):

Now, open the “Software Updates” application, which will start collecting the available updates. Install all those loaded updates:

Once your Ubuntu 20.04 is updated, the following prompt appears at the end of the update, which shows that the 22.04 LTS is not available (you have 20.04). Click on “Upgrade” to proceed:

Enter the user password:

Go through the release notes and click on “Upgrade”:

After that, the small progress window appears, which shows the installation progress of various utilities:

Multiple windows may appear, go with the onscreen instructions to keep upgrading:

While upgrading, the customization prompt of the /etc/sudoers file appears, which asks you to either keep or discard the customized configurations:

A prompt appears to remove the obsolete packages (which will be of no use on your Ubuntu 22.04):

Restart the system:

The Ubuntu 22.04 welcomes you with the following login screen:

Once the system is restarted, you can verify the update by going into the “About” section inside the settings:

That’s how you can upgrade Ubuntu 20.04 to Ubuntu 22.04, via GUI and CLI.

 

How to Upgrade Ubuntu 22.04 to Ubuntu 23.10?

At the moment, the latest LTS of Ubuntu is 22.04 whereas the latest interim release is Ubuntu 23.10. What if you want to check/test the interim release 23.10? To upgrade Ubuntu 22.04 to Ubuntu 23.10, you are allowed to do it sequentially (upgrading to 23.04, and then to 23.10). Here’s how it can be done:

Let’s check the current distribution and the Kernel version:

hostnamectl

First, set the “Prompt=normal” inside the update manager’s configuration file located at “/etc/update-manager/release-upgrades”:

Now, run the following command to check the version to whom your system will be upgraded:

sudo do-release-upgrade

Fortunately, you have the option to get Ubuntu 23.04 (Lunar Lobster). Scroll down and press “y” to start the process:

Keep on following the instructions on the terminal. Soon, the system will be upgraded to 23.04. Let’s verify it:

hostnamectl

Once your system is upgraded to Ubuntu 23.04, you can now use the “do-release-upgrade” command to upgrade to “23.10”:

sudo do-release-upgrade

Now, you can see that the upgrade has been detected, i.e., Ubuntu 23.10 (Mantic Minotaur).

Keep on following the terminal instructions, and you will soon be upgraded to Ubuntu 23.10.

 

How to Upgrade Ubuntu 22.04 to Ubuntu 24.04 (Noble Numbat) – Development Branch?

If you are an Ubuntu geek, you must be desperately waiting for the Ubuntu 24.04 (Noble Numbat). Recently, Ubuntu has announced the daily builds of Ubuntu 24.04. If you want to test the development until today, you can easily upgrade your Ubuntu 22.04 to Ubuntu 24.04. Let’s see how:

Note: Do not consider it as a full release of Ubuntu 24.04. A lot of features are yet to be added to the system.

Step 1: Configure the Update Manager

You must have the update-manager installed on your system (“sudo apt install update-manager-core”). Once installed, configure its parameter “Prompt=lts”, by opening the file “/etc/update-manager/release-upgrades” in a nano editor:

sudo nano /etc/update-manager/release-upgrades

Step 2: Upgrade Ubuntu 22.04 to Ubuntu 24.04 (Noble Numbat)

Remember, we are upgrading just for testing purposes, this is not the full release.

Let’s upgrade to the development branch of Ubuntu 24.04 (the “-d” flag forcefully upgrades to any development release available):

sudo do-release-upgrade -d

Proceed with the onscreen instructions, and soon you will see the login screen of Ubuntu 24.04 (Noble Numbat):

Here’s the first interface of Ubuntu 24.04 (Noble Numbat):

Verify it using the command:

hostnamectl

 

Bottom Line

Upgrading to the latest available LTS keeps your system up to date with the interactive design and updated security. Each LTS is backed up by three interim releases and that LTS is based on the development/testing carried out in each rolling release.

To update your old Ubuntu to Ubuntu 22.04 (current LTS), use the CLI or the GUI support of update-manager on Ubuntu. Before doing so, ensure that the preference in the “update manager” is set to “Prompt=lts” and then use the command “sudo do-release-upgrade” for CLI or go to the GUI support of the update manager to perform the updating. Do follow this guide to upgrade to Ubuntu 22.04 safely and securely.

 

Print Friendly, PDF & Email
Categories