Ubuntu 22.04 LTS Jammy Jellyfish is the latest release of Ubuntu. It was released on April 21, 2022. It is the latest long-term support LTS release after its predecessor, Ubuntu 20.04 LTS. Ubuntu 22.04 is one of the world’s most popular Linux distributions. As a long-term support release, Ubuntu 22.04 LTS will be supported for 10 years.
Before proceeding with the upgrade, please make sure to back up all the important data to your local drive.
Check the installed release
.
# cat /etc/os-release
Since using SSH port 22, select another free port
to connect for updating the server. In this case, we use port 1022.
Use the following commands to allow port 1022/TCP:
# ufw allow 1022/TCP
# ufw reload
# ufw status
Install update-manger-core
.
# apt install update-manager-core
Start the update to ubuntu 22
now.
# do-release-upgrade -d
It will detect SSH connection and notify that an additional SSH service will be started on port 1022. Simply type Y
and press ENTER
to proceed.
The upgrade tool will notify an alternative SSH port 1022 in case of an SSH connection interruption on the default port. Since the port is already opened, press ENTER
.
The update tool will calculate all the changes and provide a summary.
To continue, once again, press Y
and press ENTER
.
Some services will need to be restarted, select Yes
to restart these services during package upgrades without being prompted.
When prompted on What do want to do about modified configuration file sshd_config?, select keep the local version currently installed
.
Press Y
and hit ENTER
to remove obsolete packages.
Once the upgrade is completed, restart the system to finish the upgrade. Press Y
and hit ENTER
to reboot.
Check the OS information
after rebooting.
# cat /etc/os-release
Delete the ufw firewall rules
.
# ufw delete allow 1022/TCP
Free up the disk space
by removing all the unnecessary packages.
# sudo apt autoremove --purge