Hello, friends. We already have Ubuntu 22.04 with us, which makes us happy. We already know that the best way to get this system is to do a clean installation. But we can also simply upgrade from a previous version. That’s why today I will show you how to upgrade from Ubuntu 20.04 to Ubuntu 22.04 without dying trying. 🙂
Ubuntu 22.04 is just out of the oven, and we can already enjoy all its advantages and all its splendor. That is why many users are already wondering how to have it now.
One of the ways to do this is to upgrade directly via the terminal. This method is effective for servers or minimal Ubuntu installations. Let’s get started.
How to upgrade from Ubuntu 20.04 to Ubuntu 22.04
The first thing you need to know is that it’s an easy process, but it’s not error free. So, the first tip I give you is to back up all your data to a safe place. This way, if something happens, you can always have your data available.
First, check the current version
cat /etc/os-release
Then, open a terminal and close all other applications if you are in a graphical session. Regarding servers, just run the commands.
Now update the whole system
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
After this, install the system upgrade tool
sudo apt install update-manager-core
Now configure it to check for LTS releases
sudo nano /etc/update-manager/release-upgrades
And set the value to LTS
.
Save the changes and close the editor
Perform the upgrade to the new version by running
sudo do-release-upgrade -d
Then confirm that you will start the installation
During the upgrade process, you will be asked if you want to autostart the system services.
Or if you would like to keep the current SSH version.
At the end you will get an output screen like this
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
Restart the system to complete the installation.
Now check the changes
cat /etc/os-release
As you can see, we now have the new version of Ubuntu on the system.