This article was first published in:
How to upgrade to Ubuntu 20.04
ubuntu 20.04
Ubuntu 20.04 LTS (Focal Fossa) was released on April 23, 2020, and it will be supported for 5 years. It brings a lot of new software packages and major software upgrades, including the latest version of OpenJDK, GCC, Python, Ruby, and PHP. This release is based on the Linux 5.4 LTS kernel and adds new hardware and file system support. The desktop version uses GNOME 3.36 and a new default theme Yaru.
This guide explains how to upgrade from Ubuntu 18.04 or Ubuntu 19.10 to Ubuntu 20.04 LTS.
You can directly upgrade to version 20.04 from Ubuntu 18.04 or Ubuntu 19.10. If you are running any previous release, you must first upgrade to 18.04 or 19.10.
This upgrade operation must be run with super user authority. You need to log in to the system as root or another user with sudo privileges.
The first and most important thing, please make sure to back up your data before major upgrades to your operating system. If you are running Ubuntu on a virtual machine, you'd better take a complete system snapshot first so that you can quickly restore your machine if there is a problem with the system upgrade.
Before starting the version upgrade, we recommend that you upgrade all currently installed packages to their latest version.
All packages marked as locked versions cannot be automatically installed, upgraded or removed. This may cause problems during the upgrade process. To check if there is a locked version of the package on your system:
sudo apt-mark showhold
If there are on hold
packages, you should consider using the following command to unlock these packages:
sudo apt-mark unhold package_name
Refresh the APT list and upgrade all installed packages:
sudo apt update
sudo apt upgrade
If the kernel is upgraded, restart the machine, and once the startup is complete, log in again:
sudo systemctl reboot
Perform a major version upgrade for all installed packages:
sudo apt full-upgrade
apt full-upgrade
may remove some unnecessary packages.
Remove any packages that were automatically installed but are no longer dependent on any package:
sudo apt --purge autoremove
Upgrading to the latest Ubuntu version is a straightforward process. You can use the graphical upgrade tool or execute do-release-upgrade
from the command line to upgrade.
We will upgrade from the command line, which is suitable for desktop and server version systems.
do-release-upgrade
is part of the "update-manager-core" package, which is installed by default on most Ubuntu systems. If for some reason, the package is not installed on your system, install it with the following command:
sudo apt install update-manager-core
To start the upgrade, enter:
sudo do-release-upgrade -d
This command will disable all third-party software sources and point the apt list to focal software sources. You will be prompted several times to confirm whether you really need to continue the upgrade. When you are asked whether the service automatically restarts during the upgrade process, please enter: y
.
During the upgrade process, the command will ask you various questions, such as whether you want to save the existing configuration file, or install the maintainer version of the software version. If you have not made any custom modifications to the configuration file, the safest way is to enter: Y
. Otherwise, we recommend that you keep the current configuration file. Before you make a choice, read the question carefully.
The upgrade process will run in a GNU screen session and automatically continue when the connection is lost.
The whole process will take some time, depending on the number of packages you upgrade and your internet speed.
Once the new software packages are installed, the upgrade tool will ask you whether to remove the old software. If you are not sure, type d
and check the list of these old packages. Normally, it is safe to enter y
and remove all old packages.
When the upgrade process is complete, and assuming everything went well, you will be prompted whether to restart your machine. Enter 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
Wait a few minutes until your system boots and log in.
If you are a desktop version user, you will see a new graphical startup interface and login screen.
You can enter the following command to check the Ubuntu version:
lsb_release -a
Output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release:20.04
Codename: focal
that's it. Your new Ubuntu 20.04 installation is complete.
Upgrading to Ubuntu 20.04 LTS is relatively simple and has no side effects.
If you encounter problems, please refer to Release Page, where some known problems that may occur during the upgrade process are recorded.
Recommended Posts