The latest long-term support version of Ubuntu, named Jammy Jellyfish (22.04 LTS), made its debut on April 21, 2022. This release is set to receive support for a span of five years. Within this update, users can expect an array of fresh packages and significant software upgrades. Notably, Ubuntu 22.04 LTS incorporates the most up-to-date editions of essential tools such as OpenSSL, GCC, Python, Ruby, and PHP. Underneath its hood lies the Linux 5.15 LTS kernel, which not only brings enhanced performance but also introduces compatibility with novel hardware components and filesystems.

In the desktop edition of Ubuntu 22.04 LTS, you can expect to find kernel version 5.17, GNOME 42, and a brand-new tool for capturing screenshots and recording screens.

For those looking to upgrade to Ubuntu 22.04 LTS from either Ubuntu 20.04 or Ubuntu 21.10, this tutorial provides a step-by-step guide.

Prerequisites 

Before proceeding with the upgrade, it is important to ensure that you have the necessary prerequisites. The upgrade operation requires superuser privileges, so you must either be logged in as the root user or have sudo privileges. Typically, the user created during the initial installation of Ubuntu has superuser privileges by default.

It is worth noting that if you are currently using any release prior to Ubuntu 20.04 or 21.10, you must first upgrade to either of these versions before proceeding to Ubuntu 22.04. However, if you are already using Ubuntu 20.04 or 21.10, you can directly upgrade to version 22.04.

Be sure you have a working Internet connection.

Backup Your Data

Prior to embarking on the significant upgrade of your operating system, it is crucial to prioritize the safety of your data. Take the necessary precautions by backing up your important files and information. This ensures that even in the event of any issues during the update process, you can easily restore your data.

If you happen to be using Ubuntu on a virtual machine, it is highly recommended to create a comprehensive system snapshot. This snapshot serves as a complete copy of your virtual machine’s state, enabling you to swiftly revert back to it if any complications arise during the update. By having this snapshot in place, you can mitigate the potential risks and streamline the restoration process if needed.

Update Currently Installed Packages

To ensure a smooth release upgrade, it is advisable to update all currently installed packages to their latest versions. This helps to ensure compatibility and resolve any potential conflicts.

During the upgrade process, held-back packages can pose difficulties as they cannot be automatically installed, upgraded, or removed. To determine if there are any held-back packages on your system, you can run the following command:

sudo apt-mark showhold

If the output of the previous command is empty, it indicates that there are no held-back packages on your system, which is a positive sign.

However, if there are held-back packages, it is recommended to unhold them before proceeding with the release upgrade. To unhold the packages, you can use the following command:

sudo apt-mark unhold package_name
sudo apt update
sudo apt upgrade

If the kernel is upgraded, reboot the machine, and once booted, log back in.

Perform a system upgrade:

sudo apt full-upgrade

When performing an apt full-upgrade, it is possible that some currently installed packages may be removed in order to facilitate the upgrade of the entire system.

To further optimize your system and free up space, it is advisable to remove old kernels as well as any automatically installed dependencies that are no longer required by any package. This can be accomplished using the following command:

sudo apt --purge autoremove

Upgrade to Ubuntu 22.04 LTS (Jammy Jellyfish) 

Upgrading to the latest version of Ubuntu is a relatively straightforward process and can be done via the command line or the GUI update tool. In this tutorial, we will focus on the command line method, which is applicable to both Desktop and Server systems.

The command “do-release-upgrade” is a part of the “update-manager-core” package, which is typically installed by default on most Ubuntu systems. However, if you find that it is not installed on your system, you can install it using the following command:

sudo apt install update-manager-core

Make sure default upgrade policy in the /etc/update-manager/release-upgrades file is set to “Prompt=normal” or “Prompt=lts”. Otherwise, the upgrade process will not start.

If you are upgrading over ssh and running a firewall on your machine, you need to open the port 1022 temporarily:

sudo iptables -I INPUT -p tcp --dport 1022 -j ACCEPT

Start the upgrade process by entering:

sudo do-release-upgrade

When executing the do-release-upgrade command, several important prompts and questions will be presented to ensure a smooth upgrade process. Here are some key points to keep in mind:

1. Third-party repositories will be disabled, and the apt list will be updated to point to the “jammy” repositories for the new release.

2. You will be prompted multiple times to confirm your intention to proceed with the upgrade. It is important to carefully review each prompt before providing your response.

3. When asked if you want services to be automatically restarted during the upgrade, it is recommended to type ‘y’ to ensure a seamless transition.

4. Throughout the upgrade process, you may encounter questions regarding configuration files. If you haven’t made any custom changes to a file, it is generally safe to choose the package maintainer’s version by typing ‘Y’. However, if you have made specific modifications, it is recommended to carefully consider whether to keep the current configuration.

5. The upgrade will run within a GNU screen session, which means that even if your connection drops, it will automatically reattach and resume where it left off.

6. The duration of the upgrade process may vary depending on the number of updates and your internet speed.

7. After the new packages are installed, the update tool will prompt you to remove obsolete software. If you are uncertain, you can type ‘d’ to review the list of obsolete packages before making a decision. In most cases, it is safe to enter ‘y’ and remove all obsolete packages.

8. Once the upgrade process is completed successfully, you will be asked to reboot your machine. Type ‘y’ to proceed with the reboot.

It is essential to carefully read and understand each prompt to ensure a successful and customized upgrade experience.

Output
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

Confirm the Upgrade

After allowing your system a few moments to complete the reboot, you can proceed by logging in.

As a desktop user, you will be welcomed by a fresh graphical boot splash and a new login screen.

To verify the Ubuntu version you have just upgraded to, you can enter the following command in the terminal:

lsb_release -a
Output
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

That’s it. Enjoy your new Ubuntu 22.04 installation.

Conclusion

Upgrading to Ubuntu 22.04 LTS is generally a straightforward and hassle-free process.

However, in the rare event that you encounter any errors or issues during the upgrade, it is recommended to visit the release notes page for Ubuntu 22.04 LTS. The release notes provide valuable information about known issues that may arise during the upgrade process, along with possible solutions or workarounds.

If you have any questions or need further assistance, please feel free to leave a comment. The Ubuntu community and support team are available to help address any concerns you may have and provide guidance throughout the upgrade process.

Comments to: How to Upgrade to Ubuntu 22.04

    Your email address will not be published. Required fields are marked *