Ubuntu 22.04 (Jammy Jellyfish) is released now, and you can follow this tutorial to install it safely. Ubuntu is a Linux distro based on Debian and open-source software for those who don’t know. It is available on Desktop, Server, and Code for IoT devices. Read and learn how you can upgrade to Ubuntu 22.04
Before you upgrade your system, there are certain things you need to take care of. Here is what we’re talking about:
- Make sure you have all your important files backed up in a reliable location like an external hard disk or cloud hosts.
- Make sure you have free disk space to install the update with the following command:
$ df -H
- The upgrade process takes some time ranging from 20 minutes to a couple of hours. So do not cancel the operation once started, as you may damage your PC and its BIOS.
- Please make sure you are running your server or desktop on UPS, or if you use a laptop, make sure it has sufficient battery.
The upgrade operation requires superuser privileges. In other words, you’ll need to have sudo access. Once made sure of your super privilege, you can continue the installation. Remember, you can directly upgrade to 22.04 if you have a 20.04 or a later version installed. In case your system bags an earlier version, you must upgrade to 20.04 or 21.10
Update Currently Installed Packages
Before starting the release upgrade, updating your currently installed packages to the latest versions is recommended. What it does is help you update the concerned system to a higher Ubuntu version.
Some packages can be marked as held back and cannot be automatically installed, upgraded, or removed, which may cause issues during the upgrade process.
Run the following command to check whether some packages are on hold or not.
$ sudo apt-mark showhold
An empty output means that there are no held back packages for now. However, if you have packages on hold, you can reverse them with the following command:
$ sudo apt-mark unhold package_name
Here, you should replace the package_name with the package that is on hold. Now refresh the apt list and upgrade all installed and held back packages.
$ sudo apt update $ sudo apt upgrade
If the kernel is upgraded, then you must reboot the machine. After that, you can perform a system upgrade.
$ sudo apt full-upgrade
The apt full-upgrade can remove some existing installed packages. Yes, the ones that prevent or might prevent the update process. You can remove old kernels and all pre-installed dependencies, especially those no longer needed. To do that, simply invoke the following command:
$ sudo apt --purge autoremove
How Upgrade to Ubuntu 22.04 LTS (Jammy Jellyfish)
Now we have updated the packages, it’s a relatively straightforward process to upgrade Ubuntu to the latest version, i.e., 22.04. We’ll perform the update from the command line interface, which will work on both your PC and the server. Now, you will need a
do-release-upgrade package installed by default in most Ubuntu.
If not installed, get it by invoking the following command:
$ sudo apt install update-manager-core
If you are upgrading over shh in case of a server, it may require you to open port 1022 temporarily like this:
$ sudo iptables -I INPUT -p tcp --dport 1022 -j ACCEPT
Now proceed with the upgrade process by entering the following command:
$ sudo do-release-upgrade
$ sudo do-release-upgrade
The do-release-upgrade command is very critical in this case. It seamlessly disables all third-party repositories, eventually changing the apt list to point to the required “jammy” repositories. From there, you will be prompted by a narrative screen several times. This occurs primarily to confirm that you want to proceed with the upgrade.
When you notice that and asked whether you want to automatically restart the system during the upgrade, type “
y” and proceed.
Proceed with the Questionnaires
During the whole process, the command prompt will ask you several questions. These include whether you want to keep an existing configuration file or install the package maintainer’s version. If you didn’t make any changes to the existing file, typing “
y” won’t hurt. Otherwise, it is better to keep the fitting, current configuration.
This whole upgrade is a bit of time taking. The overall tenure depends on many factors. To name some, we’ve got your internet speed, the frequency of updates, and your device CPU.
Once you’ve installed all the new packages, the update tool will inquire if you want to remove any obsolete software. Generally, in such a case typing “
y” and removing all outdated packages is safe. However, be sure of your choices.
Once the upgrade process is complete and if all goes well, you’ll be asked to reboot your machine—you can safely type “
Wait for the Reboot and Login
Once you confirm with “y” wait for some time until the system boots up. After that, you’ll need to log yourself in. If you make this update on your local machine, you will be greeted with a graphical boot splash and a login screen.
Now check the Ubuntu version with the following command:
$ lsb_release -a
Now enjoy. you have successfully installed the latest Ubuntu 22.04 through the command-line interface.
Upgrade to Ubuntu 22.04 via GUI
You have to check for available packages just like we did with the CLI like this.
Once all done, reboot the system. For that, invoke the following command:
$ sudo apt update $ sudo apt upgrade -y $ sudo reboot
Now you can start the upgrade, to launch the GUI run the following command.
$ sudo do-release-upgrade -d -f DistUpgradeViewGtk3 or $ sudo update-manager -c -d
Now, the main GUI will appear, and in the following windows, an installer will ask you to confirm the upgrade.
Here, click on the Start Upgrade button. Installing the required packages will take around 20 to 40 minutes or longer.
Now, it will transit your installed Firefox to a snap package, which will be available as a snap package.
Click on next to proceed. The installer will prompt you to replace or keep the customized files just like the CLI method.
Here, we have clicked replace, but it’s not mandatory. You can click according to your need.
Now click on remove the obsolete package. Once the installer has installed all the packages and removed the obsolete ones, it will ask you to reboot the system.
Click on the Restart button. After reboot, you will be asked to sign in, so hit enter and provide the necessary credentials. After that, open the Terminal and run the command
‘lsb_release -a’ to verify the update
With that, you can then see that the installation is successful, and Ubuntu 22.04 is installed. That was easy, wasn’t it? You just have to follow the appropriate procedures, and you’re good to go.
If this guide helped you, please share it.