On April 22, 2021, Ubuntu 21.04 (codenamed Hirsute Hippo) was released by Canonical with security and performance improvements along with newer versions of software applications. Ubuntu 21.04 includes an SDK for Flutter application development, Microsoft SQL Server for Ubuntu, and Wayland graphics by default. Microsoft and Canonical will jointly provide support and performance tuning for Microsoft SQL Server on Ubuntu.
Although this update includes many improvements and updates, the support period is only 9 months, i.e. until January 2022. If you are looking for long-term support, then Ubuntu 20.04 LTS (codenamed Focal Fossa) is recommended, as it has 5 years of long-term support until April 2025.
Before you take the flight to upgrade, you need to keep a backup of important files and documents in an external storage or cloud storage. If you are using Ubuntu 20.04, you need to upgrade to Ubuntu 20.10 first, as version 20.10 is still supported by Canonical and has a lifespan until July 2021, so let's proceed with the upgrade.
There are mainly two ways to upgrade, one is the GUI-based update manager and the other is the command-based one. In this article, I will show you step-by-step how to upgrade your Ubuntu system via command-line and via GUI.
Upgrade Ubuntu 20.04 to 21.04 Using GUI Update Manager
Before upgrading make sure all the software packages information was up to date. If any update is available, a prompt with the install option will appear then click on install and continue with the authentication.
After installation completes the package manager will request to restart you to complete the process then click on Restart Now and wait for boot up.
Now, from the application menu search and open Software & Updates.
Then click on the Updates tab at the bottom there may be a section called Notify me of a new Ubuntu Version. Update it setting to For any new version from the current one then you will be asked for authentication to apply changes.
Now, close the Software & Updates and open Software Updater. You will see the following prompt window for ubuntu 20.04. To upgrade your Ubuntu 20.04 to 21.04, you need to first upgrade it to 20.10 then 21.04 as version 20.10 is still supported by Canonical. The method of upgrading is the same so there won’t be a problem.
For 20.10 you will see the following one,
Now, click on Upgrade to continue with the upgrade process and the dialog will appear with release notes again click on Upgrade.
Then you will see the following distribution upgrade window. In the process you may be notified that some third-party sources are disabled, you can simply ignore it and close the dialog as you can re-enable it after the upgrade completes.
During the upgrade process, you will see the following window giving you the option to continue the start update or cancel it. You can start by clicking on Start Upgrade.
During the process you may get the following type of configuration window, you simply need to select it if not then click on Next to continue the upgrade process.
Once a new version of the packages is installed you will see the prompt in the terminal asking you to keep or remove obsolete packages. You may proceed with removal as these packages were no longer maintained by its developer or no other package depends upon it and there are only a few users of it. There may be many causes why Ubuntu package maintainers want to remove these packages.
After the obsolete package is removed completely the update manager will ask to restart your system to apply changes.
Once reboot completely, you can verify the upgrade by running the command given below,
$ lsb_release -a
Upgrading Ubuntu 20.04 to 21.04 Using Command-Line
We can upgrade our system using commands, you need to simply follow the following procedure.
First of all, update package information.
$ sudo apt update
Then,
$ sudo apt dist-upgrade
After running the above command if you see the new kernel being installed then your system needs to be rebooted before continuing to upgrade. To reboot run:
$ sudo shutdown -r now
After the reboot completes, we need to make some changes in the update manager config file. To do so open the following config file in your preferred editor, I am using vim.
$ sudo vim /etc/update-manager/release-upgrades
At the bottom of the file, you will see the Prompt change its value from LTS to normal. After changes are made simply write and quit the file.
Now, if your Ubuntu current build is 20.04, you need to first upgrade to Ubuntu 20.10 following the same process then, lastly upgrade to Ubuntu 21.04 from Ubuntu 20.10. After everything is set up, execute the following command to proceed with the upgrade.
$ do-release-upgrade
After running the above command, it will do some process then you will be prompted with the following question. To start the upgrade type y and hit enter then you will be notified that your screen lock will remain disabled during the upgrade process, to continue again hit enter.
Depending on your network it will take time to download all the packages. Once downloaded completely you will see the following configuration prompt then select ok and hit enter.
Then, again you will see another prompt dialog asking you to choose whether to continue with the configuration or not. For me, I would prefer to go with config so I select yes and hit enter.
Once installation completes you will be asked if you want to remove obsolete packages, I will go with yes so I type y and hit enter. Obsolete packages refer to unused packages or packages that were no longer in development or in use.
Now, once everything is set up you will be asked to reboot your system in order to do so type y and hit enter. After reboot is completed you can test your Ubuntu version using the following command.
$ lsb_release -a
The Ubuntu upgrade from 20.04 to 21.04 has been completed successfully.