How to Upgrade Ubuntu 22.04 to Ubuntu 24.04 (Command Line Guide)
In this tutorial, I’ll show you how to upgrade Ubuntu 22.04 to Ubuntu 24.04 using the command line. This works on both Ubuntu Server and Desktop versions.
I'll also show you the proper way to upgrade a remote server over SSH.
Here are the steps to upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS:
- Run
sudo apt update
andsudo apt upgrade
to update your packages. - Restart the computer.
- Run
sudo do-release-upgrade
to start the upgrade to Ubuntu 24.04. - After the upgrade completes, restart the computer again.
Step 1: Install the Latest Updates for Your Packages
Start by installing the latest updates. Run these commands to update your packages:
sudo apt update
sudo apt upgrade
Step 2: Restart the System
After upgrading packages, restart your system:
sudo reboot
Step 3: Start the Upgrade to Ubuntu 24.04
After the restart, run the do-release-upgrade
command. This command upgrades the system to Ubuntu 24.04.
sudo do-release-upgrade
During the process, if asked about /etc/fwupd/fwupd.conf
, choose the default option—N or O—to keep your current version
.
Step 4: Restart After the Upgrade
Once the upgrade is complete, reboot your system. After reboot, check the Ubuntu version with:
lsb_release -a
Upgrading Over SSH
You can upgrade Ubuntu Server via SSH using the same steps, but there’s a risk if the SSH connection drops during the process.
To avoid this risk, use a screen session when upgrading a remote server over SSH. I’ll show you how in the next tutorial: How to Upgrade Ubuntu Server over SSH.