Upgrading to the latest Ubuntu version is a pretty straightforward process. You can upgrade either from the command line with do-release-upgrade or the GUI update tool.

We’ll perform the update from the command line, which should work for both Desktop and Server systems.

do-release-upgrade

is part of the “update-manager-core” package that is installed by default on most Ubuntu systems. If, for some reason, it is not installed on your system, install it with:

# 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 run 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 -d

The do-release-upgrade command will disable all third-party repositories and change the apt list to point to the “jammy” repositories. You will be prompted several times to confirm that you want to continue with the upgrade. When asked whether you want the services to be automatically restarted during the upgrade type y.

During the upgrade process, the command will ask you various questions, like whether you want to keep an existing configuration file or to install the package maintainer’s version. If you didn’t make any custom changes to the file, it should be safe to type Y. Otherwise, is recommended to keep the current configuration. Read the questions carefully before making a selection.

The upgrade runs inside a GNU screen session and will automatically re-attach if connection drops.

The whole process may take some time depending on the number of updates and your Internet speed.

Once the new packages are installed, the update tool will ask you if you want to remove the obsolete software. If, you are not sure type d and check the list of obsolete packages. Generally, it is safe to enter y and remove all obsolete packages.

When the upgrade process is complete and assuming all went well, you’ll be asked to reboot your machine. Type y to continue:

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

Wait for a few moments until your system boots up and log in.

If you are a desktop user, you will be greeted with a new graphical boot splash and login screen.

You can also check the Ubuntu version by entering the following command:

lsb_release -a
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 a relatively easy and painless task.

If you encounter any error, visit the release notes page, which covers the known issues that might happen during the upgrade process.

Feel free to leave a comment if you have any questions.