This article will demonstrate how to upgrade Ubuntu 18.04 to 20.04. We recommend always staying up to date to the latest LTS (Long Term Support) version of Ubuntu and this article assumes the intermediary releases were skipped. As soon as a new LTS version is made available to you in your package manager you should go ahead and plan to upgrade your ubuntu distro. For those of you that are running 18.04, you should go ahead and plan to upgrade to 20.04 soon.
This article will demonstrate how to perform the upgrade on the command line. This can be done for both Ubuntu desktop and Ubuntu server.
Make sure to backup all data before performing the upgrade!
Upgrade to Ubuntu 20.04 LTS from the command line
By upgrading on the command line you will not have any GUI options available to you. This article is assuming you are an experienced Linux Systems Administrator and that you have performed a backup of your entire system already.
- Check if an upgrade is available
sudo do-release-upgrade -c
- If you receive a message stating there is no development version of an LTS available, you are done. Else, continue with the upgrade.
sudo do-release-upgrade -c
- Answer in prompted questions. The upgrade may take a while to complete.
- The upgrade is complete. Now verify any services or software are running as expected on your newly upgraded instance of Ubuntu 20.04 LTS.
Support checking for non LTS upgrades
While the primary purpose of this article is to demonstrate how to upgrade to the latest LTS version of Ubuntu, you may want to enable your package manager to look for development versions as well. As you may have noticed when running the
sudo do-release-upgrade -c command earlier, there is an option to support development version updates.
To upgrade to the latest non-LTS development release set Prompt=normal in /etc/update-manager/release-upgrades.
The release-upgrades file looks like the following:
# Default behavior for the release upgrader. [DEFAULT] # Default prompting and upgrade behavior, valid options: # # never - Never check for, or allow upgrading to, a new release. # normal - Check to see if a new release is available. If more than one new # release is found, the release upgrader will attempt to upgrade to # the supported release that immediately succeeds the # currently-running release. # lts - Check to see if a new LTS release is available. The upgrader # will attempt to upgrade to the first LTS release available after # the currently-running one. Note that if this option is used and # the currently-running release is not itself an LTS release the # upgrader will assume prompt was meant to be normal. Prompt=lts
As you can see, the Prompt is set to only check for LTS versions. Simply change that to normal to get the intermediary versions before the next LTS release is made available.
This article demonstrated how to upgrade from Ubuntu 18.04 to 20.04 LTS on the command line. Let us know in the comments if you have any questions or would like to see alternative ways of upgrading Ubuntu. Read more of our articles.