In my last blog article, I reported on the launch of Ubuntu 24.04, new features, and how to protect it with BDRSuite. You can read more details here Protect your Linux workloads with BDRSuite.

Today I am going to show you how to upgrade from Ubuntu 22.04 to Ubuntu 24.04.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

So, let’s get started.

Verify Ubuntu version

Before we continue with the actual steps, we should first check which version of Ubuntu we are using in our infrastructure. Open Terminal and type cat /etc/os-release to see the version.
As you can see, I am using Ubuntu 22.04.4 LTS, codenamed Jammy.

Backup your Ubuntu 22.04

Verify Ubuntu version

What version are you running?

Download Banner

Step 1: Backup your Ubuntu 22.04

Before you perform a new update or upgrade, you should make a backup of the current state of your Ubuntu machine. Is there a better way than using BDRSuite? BDRSuite will help you back up your Ubuntu 22.04 or any other operating system, whether bare-metal or hypervisor.
Whether you’re installing Ubuntu 22.04 on a workstation or hosting it on Hyper-V, VMware, KVM, or Proxmox – BDRSuite has got you covered.
BDRSuite can be installed on Windows, Windows Server, Linux, and docker containers. Here is the blog article that explains how to install BDRSuite on Windows and Windows Server.
Any questions, please let us know in the comment section.

Step 2: Configure firewall rules

By default, Linux uses SSH port 22 to perform the upgrade process. We should open an additional port, TCP 1022, which will act as a fallback port in case SSH dies during the upgrade process.

  1. Open Terminal
  2. Enter the following command to allow the TCP 1022 port
    sudo ufw allow 1022/tcp
  3. Backup your Ubuntu 22.04

    sudo ufw allow 1022/tcp

  4. Enter the following command to enable the firewall:
    sudo ufw enable
  5. Backup your Ubuntu 24.04

    sudo ufw enable

  6. Enter the following command to accept the traffic to port 1022:
    sudo /sbin/iptables -I INPUT -p tcp –dport 1022 -j ACCEPT

Backup your Ubuntu 22.04

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

Step 3: Update and Upgrade Ubuntu 24.04

In this step, you will update and upgrade all installed packages on Ubuntu 22.04. In this way, we ensure that Ubuntu 22.04 is ready for the upgrade to Ubuntu 24.04. To do so, you will need to use the root account.

During the update and upgrade process, you may be prompted to enter Y to confirm the upgrade process. Please do so.

  1. Open Terminal
  2. Enter the following commands one after the other and press Enter. You will be prompted to enter a root password.
    sudo apt-get update
    sudo apt list –upgradable | more
    sudo apt upgrade

Backup your Ubuntu 24.04

sudo apt upgrade

Backup your Ubuntu 24.04

The upgrade in progress

Step 4: Upgrade Ubuntu 22.04 to Ubuntu 23.10

In this step, we will first upgrade from Ubuntu 22.04 to Ubuntu 23.10, and then in the fourth step to Ubuntu 24.04. Before proceeding with the upgrade to Ubuntu 23.10 which is a non-LTS version, we need to modify the release-upgrade file.

Why? Linux prioritizes LTS upgrades over non-LTS upgrades.

  1. Open Terminal
  2. Enter the following command and press Enter.
    sudo nano /etc/update-manager/release-upgrades
  3. Navigate to Prompt=LTS and change it to Prompt=normal. You can move to Prompt using the down arrow keys on the keyboard
  4. Backup your Ubuntu 22.04

    Prompt=normal

  5. Press CTRL + O, and then press Enter to save the file
  6. Press CTRL + X to exit the nano editor
  7. Enter sudo reboot to reboot Ubuntu 22.04
  8. Once rebooted, open Terminal again and enter the following command to start the upgrade process:
    sudo do-release-upgrade
  9. Backup your Ubuntu 24.04

    sudo do-release-upgrade

    You will be prompted to enter Y to confirm and proceed with the upgrade process. During the procedure, Linux will remove, refresh, and install packages.

  10. Once finished, you will be asked to restart your Linux
  11. Backup your Ubuntu 22.04

    To finish the upgrade, a restart is required

  12. Once restarted, open Terminal, and enter the following command to verify the version installed. As you can see, I am running Ubuntu 23.10, codename Mantic.
    sudo lbs_release -a

Backup your Ubuntu 24.04

sudo lbs_release -a

Step 5: Upgrade Ubuntu 23.10 to Ubuntu 24.04 LTS

In this step, we will upgrade from Ubuntu 23.10 to Ubuntu 24.04 LTS. Since 24.04 is an LTS
version, we must revert Prompt to LTS.

  1. Open Terminal
  2. Enter the following command and press Enter.
    sudo nano /etc/update-manager/release-upgrades
  3. Navigate to Prompt=normal and change it to Prompt=lts. You can move to Prompt using the down arrow keys on the keyboard
  4. Backup your Ubuntu 22.04

    Prompt=lts

  5. Press CTRL + O and press Enter to save the file
  6. Press CTRL + X to exit the nano editor
  7. Enter the following command, enter Y and press Enter to start the upgrade process:
    sudo do-release-upgrade
  8. Backup your Ubuntu 22.04

    sudo do-release-upgrade

  9. You will be prompted to enter Y to confirm and proceed with the upgrade process
  10. Backup your Ubuntu 22.04

    The upgrade in progress

  11. Press Enter to confirm an upgrade to Thunderbird Snap. Starting in Ubuntu 24.04, all new releases of Thunderbird are only available to Ubuntu users through the snap package
  12. Backup your Ubuntu 22.04

    Configuring thunderbird

    Once confirmed, the upgrade process will continue

    Backup your Ubuntu 22.04

    The upgrade in progress

  13. You will be prompted to enter Y to confirm and proceed with the upgrade process
  14. Once the upgrade is done, you will notice a new UI which means Ubuntu 24.04 is successfully installed

Backup your Ubuntu 22.04

Ubuntu 24.04

Additionally, you can verify the version in Terminal by using the following command:
sudo lbs_release -a

Backup your Ubuntu 22.04

sudo lbs_release -a

Conclusion

Upgrading from Ubuntu 22.04 to Ubuntu 24.04 is a straightforward process when following the outlined steps. First, confirm your current Ubuntu version to ensure you’re starting from 22.04.

Then, back up your Ubuntu 22.04 using BDRSuite to protect your data. Next, configure your firewall rules by allowing a fallback SSH port (TCP 1022) to avoid disruptions during the upgrade.

After securing your system, update and upgrade all installed packages on Ubuntu 22.04. This step ensures your system is prepared for the upgrade. Subsequently, upgrade to Ubuntu 23.10 by modifying the release-upgrades file to prioritize non-LTS updates temporarily. Reboot and follow the prompts to complete this intermediate upgrade.

Finally, revert the release-upgrades file to prioritize LTS updates and proceed with the upgrade to Ubuntu 24.04 LTS. Confirm necessary changes during the process, such as migrating to Thunderbird Snap.

Once completed, you’ll enjoy the new features and improved interface of Ubuntu 24.04.

Do you have any questions? Please let us know in the comments.

Related Posts:
Ubuntu 24.04 is Here! Protect your Linux workloads with BDRSuite

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post