Ubuntu<\/a> Desktop users can upgrade to the latest version immediately, however, it is advised that the Ubuntu server production users wait for a few months before upgrading to Ubuntu 20.04 LTS.<\/p>\n\n\n\nFor those who are ready to go ahead and upgrade then this tutorial will show you how to upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS via the command line. So let’s get started.<\/p>\n\n\n\n
Step 1: Backup Your Data<\/h2>\n\n\n\n
It is strongly recommended to backup all your data from Ubuntu Desktop or Server to a remote location or external disk before attempting any upgrades. If you are on a cloud service or running off a VM you may also take a complete system snapshot if possible.<\/p>\n\n\n\n
Note: Remember that it’s safest to perform major operating system upgrades only when you have direct physical access to the machine. If using SSH, for virtual machines or managed servers you should keep in mind that losing SSH connectivity is a risk. Ensure you have another means of accessing the server such as a web-based console feature, for example.<\/em><\/p>\n\n\n\nStep 2: Update Currently Installed Packages<\/h2>\n\n\n\n
We need to make sure all the installed packages are updated. Begin by updating the package list:<\/p>\n\n\n\n
$ sudo apt update<\/code><\/pre>\n\n\n\nNow we can upgrade installed packages to their latest available versions:<\/p>\n\n\n\n
$ sudo apt upgrade<\/code><\/pre>\n\n\n\nYou will be shown a list of upgrades and prompted to continue. Agree to the prompts to begin the upgrades.<\/p>\n\n\n\n
Once it is finished use the dist-upgrade<\/strong> command which will perform any additional upgrades such as changing dependencies, adding or removing new packages as necessary.<\/p>\n\n\n\n$ sudo apt dist-upgrade<\/code><\/pre>\n\n\n\nAgain, answer y when prompted to continue, and let the process run its course. You are now ready to begin the upgrade from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS.<\/p>\n\n\n\n
Step 3: Upgrade to Ubuntu 20.04 LTS<\/h2>\n\n\n\n
Here we will use the tool called do-release-upgrade to make the upgrade safer and easier. do-release-upgrade<\/em> is the officially recommended upgrade path for server upgrades which must be performed over a remote connection. The tool handles checking for a new release, updating sources.list,<\/em> and a range of other tasks. proceed by running the following command:<\/p>\n\n\n\n$ sudo do-release-upgrade<\/code><\/pre>\n\n\n\nIf you get the following output, it means the new Ubuntu version has not been officially released yet.<\/p>\n\n\n\n
Checking for a new Ubuntu release\nNo new release found<\/code><\/pre>\n\n\n\nOn Ubuntu Server, the new LTS release isn’t made available to do-release-upgrade until its first point release, which is Ubuntu 20.04.1. This usually comes a few months after the initial release date.<\/p>\n\n\n\n
If you still want to upgrade without waiting you can install a development release by adding the -d<\/strong> option:<\/p>\n\n\n\n$ sudo do-release-upgrade -d<\/code><\/pre>\n\n\n\nIf you’re connected to your system over SSH, you will be asked whether you wish to continue. At the prompt, type y<\/strong> and press Enter<\/strong> to continue:<\/p>\n\n\n\nReading cache\n\nChecking package manager\n\nContinue running under SSH?\n\nThis session appears to be running under ssh. It is not recommended\nto perform a upgrade over ssh currently because in case of failure it\nis harder to recover.\n\nIf you continue, an additional ssh daemon will be started at port\n'1022'.\nDo you want to continue?\n\nContinue [yN]<\/code><\/pre>\n\n\n\nNext, you will be informed that do-release-upgrade is starting a new instance of ssh on port 1022:<\/p>\n\n\n\n
Starting additional sshd\n\nTo make recovery in case of failure easier, an additional sshd will\nbe started on port '1022'. If anything goes wrong with the running\nssh you can still connect to the additional one.\nIf you run a firewall, you may need to temporarily open this port. As\nthis is potentially dangerous it's not done automatically. You can\nopen the port with e.g.:\n'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'\n\nTo continue please press [ENTER]<\/code><\/pre>\n\n\n\nOnce the new package lists have been downloaded and processed, you’ll be asked if you want to start the upgrade. Enter y<\/strong> to continue:<\/p>\n\n\n\nDo you want to start the upgrade?\n\n\n18 installed packages are no longer supported by Canonical. You can\nstill get support from the community.\n\n3 packages are going to be removed. 142 new packages are going to be\ninstalled. 452 packages are going to be upgraded.\n\nYou have to download a total of 338 M. This download will take about\n42 minutes with a 1Mbit DSL connection and about 13 hours with a 56k\nmodem.\n\nFetching and installing the upgrade can take several hours. Once the\ndownload has finished, the process cannot be canceled.\n\n Continue [yN] Details [d]<\/code><\/pre>\n\n\n\nThe upgrade will now proceed and this process will take a while. keep an eye on the process during the installation as you may be presented with interactive dialogs that will require your action to process and make choices. <\/p>\n\n\n\n
You will have to make the right calls based on your current preferences in each case. In most cases, you will answer ‘yes<\/strong>‘, or you will opt to keep the current configuration.<\/p>\n\n\n\nOnce new packages have finished installing, you will be asked whether you are ready to remove obsolete packages. On a stock system with no custom configuration, it should be safe to enter y here. On a system you have modified heavily, you may wish to enter d<\/strong> and inspect the list of packages to be removed, in case it includes anything you will need to reinstall later.<\/p>\n\n\n\nRemove obsolete packages?\n\n53 packages are going to be removed.\n\n Continue [yN] Details [d]<\/code><\/pre>\n\n\n\nFinally, assuming all has gone well, you will be asked to restart the system. Enter y<\/strong> to continue:<\/p>\n\n\n\nSystem upgrade is complete.\n\nRestart required\n\nTo finish the upgrade, a restart is required.\nIf you select 'y' the system will be restarted.\n\nContinue [yN]<\/code><\/pre>\n\n\n\nGive your server a moment to reboot, then reconnect.<\/p>\n\n\n\n
Conclusion<\/h2>\n\n\n\n
You should now have a working Ubuntu 20.04 installation. It is also good practice to investigate necessary configuration changes to services and deployed applications to ensure everything is still working as expected.<\/p>\n","protected":false},"excerpt":{"rendered":"
Ubuntu 20.04 LTS (Focal Fossa) was released on Apr 23, 2020. This LTS (Long Term Support) flavor will be supported until 2025. As usual, the Standard release will be supported…<\/p>\n","protected":false},"author":1,"featured_media":8760,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,9,16],"tags":[142,193,354,431,433,531,543,573,591,598,604],"yoast_head":"\n
How to Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS (Focal Fossa)<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\n\n\t\n\t\n\t\n