
Ubuntu is a modern open-source Linux distribution that's available in different versions. Ubuntu 24.04 is an LTS (Long Term Support) version with the latest packages, newer kernel features, improved application stability, and security improvements compared to Ubuntu 22.04. You can upgrade Ubuntu 22.04 to 24.04 to take advantage of these enhancements.
This article covers how to upgrade from Ubuntu 22.04 to 24.04.
Before you begin:
Deploy an Ubuntu 22.04 instance on Vultr.
Access the instance using SSH as a non-root user with sudo privileges.
Ensure you've at least 5GB of free space.
Output:
Installed applications must be compatible with Ubuntu 24.04 before upgrade. Upgrading incompatible applications may lead to runtime errors or package conflicts on your server. Follow the steps below to view all the installed applications and check the compatibility of installed applications before upgrading Ubuntu 22.04 to 24.04.
Export the list of all installed application packages to a single file.
View the file contents and visit the official documentation of each package to verify that it's compatible with Ubuntu 24.04.
Visit the official Ubuntu 24.04 release notes to verify all incompatible dependencies and known performance issues.
Follow the steps below to update the APT package manager repository sources and upgrade all existing packages to the latest versions on your server.
View the server's distribution version and verify that it's Ubuntu 22.04.
Update your server's package information index.
Upgrade all existing packages to the latest versions.
If you receive the following Kernel warning:
Restart your server to load the new Kernel version.
Remove all unwanted packages.
Remove any cached packages.
The Ubuntu 24.04 upgrade process uses the temporary SSH port 1022 as a fallback port in case your SSH session terminates before the upgrade process is complete. Follow the steps below to enable connections to the temporary SSH port 1022 on your server.
Allow port 1022 through the default UFW firewall.
Reload UFW to apply the firewall changes.
View the UFW status and verify that the new rule is available.
Output:
Follow the steps below to upgrade your server to Ubuntu 24.04 from Ubuntu 22.04.
Run the following command to start the upgrade process.
Enter Y and press Enter when prompted to upgrade to Ubuntu 24.04.
Enter Y and press Enter to enable the temporary SSH port 1022.
Press Enter to accept the additional firewall rules and continue with the upgrade.
Enter Y and press Enter to start the upgrade.
Select your desired keyboard layout and press Enter when prompted.
Press Enter to choose N and keep the default /etc/systemd/journald.conf configuration version when prompted.
Press Enter to choose N and keep the default /etc/systemd/timesyncd.conf configuration version when prompted.
Select the keep the local version currently installed option and press Enter when prompted to modify the /etc/ssh/sshd_config file.
Select the keep the local version currently installed option and press Enter when prompted to modify the /etc/default/grub file.
Press Enter to select N and keep the existing /etc/cloud/cloud.cfg configuration file version.
Enter D when prompted to view obsolete packages, enter Y, and press Enter to remove the packages.
Wait for at least 30 minutes for the upgrade process to complete depending on your server packages, enter Y and press Enter when prompted to restart the server.
To further optimize your server setup after the upgrade, you may want to install Docker on Ubuntu 24.04. Docker enables you to run applications in containers, providing improved efficiency and resource management.
Follow the steps below to test your server packages and verify that the system upgrades to Ubuntu 24.04.
View the active Ubuntu version on your server.
Output:
View the upgraded kernel version.
Output:
Delete the temporary SSH port 1022 you created earlier.
Follow the steps below to verify the existing package repository sources and upgrade all packages on your server.
View all existing APT repository sources.
Modify any third-party repository files to include the new Ubuntu 24.04 sources.
Update the server's package information index.
Upgrade the server packages.
Remove all unused and obselete packages.
You have upgraded your server from Ubuntu 22.04 to 24.04. With this upgrade from Ubuntu 22.04 to 24.04, you can access new security improvements, improved application performance, and upgraded package dependencies on your server. For more information about the upgrade process, please visit the Ubuntu server upgrade documentation.
0 Comments
Be the first to comment and share your perspective with the community.