How to Upgrade from Ubuntu 22.04 to Ubuntu 24.04 LTS

September 20th, 2024
How to Upgrade from Ubuntu 22.04 to Ubuntu 24.04 LTS

Ubuntu 24.04 (Noble Numbat), the newest LTS (Long-Term Support) release, was released on April 25, 2024. As with previous LTS releases, it comes with many new features and software versions. It also includes performance tweaks, bug fixes, and visual improvements to augment the user experience. Additionally, it brings enhanced security fixes to bolster system security.

Ubuntu 24.04.1 LTS is already out. It was released on August 29th, 2024, making it the latest point release for Ubuntu 24.04. It includes a revamped installer, bug fixes, and numerous performance enhancements.

If you are running Ubuntu 22.04 LTS ( Jammy JellyFish), you can upgrade directly to this point release. Before August 29th, this was not possible and you had to first upgrade to Ubuntu 23.10 (Mantic Minatour ) and then eventually to Ubuntu 24.04 LTS.

Ready to upgrade to Ubuntu 24.04.1 LTS? Let's dive in.

Things to remember before the upgrade

Before starting the migration to Noble Numbat, take into account the following salient points:

The upgrade provides a direct path from Ubuntu 22.04 (Jammy JellyFish) to Ubuntu 24.04 (Noble Numbat).

Take time and acquaint yourself with the release notes to get a hang of the latest LTS release

25 GB of free disk space is the minimum requirement for storage space. You want to ensure that you have plenty of room in your storage for the upgrade to Noble Numbat.

Get a stable internet connection for the upgrade. A weak or unstable connection can interrupt the SSH connection to the server, leading to an interrupted upgrade and data corruption.

Deploy and scale your projects with Cherry Servers' cost-effective dedicated or virtual servers. Enjoy seamless scaling, pay-as-you-go pricing, and 24/7 expert support—all within a hassle-free cloud environment.

Upgrading to Ubuntu 24.04 LTS

Step 1: Back up your files

First, log into your server via SSH as a sudo user. If running a graphical environment simply provide your user account’s password.

Creating a backup copy of your files is always recommended before switching to a new OS release. There are multiple backup options for saving your data. These include saving data on your USB or Pendrive, NAS, and cloud storage.So, ensure to take a backup copy of your files.

Step 2: Allow port 1022 on the Firewall

During the upgrade, an additional SSH session on port 1022 will be created as a fallback plan in case the default SSH session is interrupted. This prevents upgrade failure in case the default SSH connection on port 22 is interrupted, which can lead to upgrade failure.

With that in mind, allowing SSH traffic on port 1022 on the firewall is recommended.

Therefore, run the following commands to open port 1022 if you are running a UFW firewall on your server.

sudo ufw allow 1022/tcp
sudo ufw reload

If you use Iptables, issue this command.

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

Step 3: Upgrade to Ubuntu 22.04

With your backup in place, update the local package index using the apt update command.

sudo apt update

update-package-lists-ubuntu-24.04

Next, upgrade your system to Ubuntu 22.04.4 (the latest point release for Ubuntu 22.04).

sudo apt upgrade -y

upgrade-software-versions-ubuntu-24.04

Once the upgrade is complete, be sure to confirm that the system has been upgraded to the latest point release of Ubuntu 22.04 LTS, which is Ubuntu 22.04.4 LTS.

cat  /etc/os-release

check-ubuntu-release-ubuntu

From the output, you can see that we are using the latest point release of Ubuntu 22.04. At this point, we can now commence the upgrade.

Step 4: Begin the upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS

Next, execute the do-release-upgrade command to effectively begin the upgrade to Ubuntu 24.04.

do-release-upgrade

The text on your terminal indicates you can now migrate to Ubuntu 24.04.1 LTS. Take your time and scroll through the general information provided about Ubuntu.

do-release-upgrade-command-upgrade

To proceed with the upgrade process, type y and hit ENTER.

do-release-upgrade-command-upgrade Next, you will see a warning about the potential of the default SSH session dropping, which might lead to the upgrade failure and filesystem corruption. You will also be notified about an additional SSH daemon that will be started on port 1022 should the default SSH connection break during the upgrade. To proceed, just type y and hit ENTER.

start-additional-sshd-daemon-upgrade-to-ubuntu-24.04

Since we have already opened port 1022 on the firewall on which an additional SSH session is running, press y and hit ENTER.

upgrade-tool-allow-port-1022

The upgrade tool will determine the packages that are no longer supported, those to be removed, and those to be installed. In addition, it will calculate the estimated download size and the time taken to download the packages with your current internet connection. Press d to get more information about the upgrade process. To proceed, press y and hit ENTER.

start-upgrade-to-ubuntu-24.04

You might happen upon this notification about the availability of a new SSH configuration file. The default selection lets you keep the current configuration and works just fine. So, just press ENTER to proceed.

choose-to-keep-sshd-confguration-file

The upgrade tool then searches for obsolete packages and prompts you to remove them. Press y and hit ENTER.

remove-obsolete-packages

The upgrade will continue and take quite some time. In our case, this took roughly 20 minutes. Once complete, select y to restart the system and boot into Ubuntu 24.04 LTS.

restart-ubuntu-24.04-after-upgrade

Step 5: Verify the migration to Ubuntu 24.04 LTS

Once you reboot, pay close attention to the welcome information on your terminal. You will notice that you are now running Ubuntu 24.04.1 LTS.

boot-into-ubuntu-24.04-lts

You can further verify the release using the cat command as follows.

cat  /etc/os-release

verify-ubuntu-24.04-version

In addition, consider also updating the local package cache to ensure you have the latest list of software versions in the package lists.

sudo apt update

update-package-lists-ubuntu-24.04

And that’s it! You have completed your upgrade to Ubuntu 24.04.

Conclusion

Ubuntu 24.04 LTS (Noble Numbat) brings the latest advancements in the open-source ecosystem. This is barely a few months before Ubuntu marks 20 years since its release. It provides a bag of goodies to enhance usability, performance and user experience. Whether you are a student, systems administrator, or desktop enthusiast, the latest release has something in store.

Winnie is a seasoned Linux Systems administrator, currently specializing in writing technical Linux tutorials. With over seven years of experience in deploying and working with major Linux distributions such as Ubuntu, Debian, RHEL, OpenSUSE, and ArchLinux, she has written detailed and well-written "How to" Linux guides and tutorials. Winnie holds a Bachelor's Degree in Computer Science from Masinde Muliro University, Kenya and resides in Nairobi, Kenya. She is an expert in authoring Linux and DevOps topics involving Docker, Ansible, and Kubernetes. She currently works as a freelance technical writer and consultant. In her previous roles, she worked in the capacity of an IT support specialist and Linux administrator. Her key roles included offering level 1 and 2 support to both in-house and remote staff and managing and monitoring Linux servers.

Start Building Now

Deploy your new Cloud VPS server in 5 minutes starting from $5.83 / month.

We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: 8e62bac5.755