If you want to upgrade to the latest version of Ubuntu 20.04 then, In this article, you will learn How to upgrade from Ubuntu 18.04 LTS to 20.04 LTS.
Ubuntu 20.04 LTS, which is also known as Focal Fossa was officially released on April 23. LTS stands for Long Term Support, which means you will get the security patches and updates until 2025. A new LTS version is released every two years and gets security patches and support for five years.
- A VPS or a local server on which Ubuntu 18.04 or 19.10 latest version is running.
- You must log-in with a root user or a user with sudo privilege to make the changes.
- Internet connection
Note: I always recommend taking the backup of existing data before starting any upgrade. So, If you get any problems during the upgrade then, it will be easy for you to do a fresh installation and, you can migrate the data to the newly installed operating system.
We are going to see here two methods firstly using the command-line and secondly through the Graphical User Interface.
I: Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS Using the Command-Line
Step 1: Upgrade all installed packages on Ubuntu 18.04 LTS
Before even thinking to upgrade to Ubuntu 20.04, it is the best practice to update and upgrade all the installed packages. So you can run the below commands for that purpose.
sudo apt update
sudo apt list --upgradable
sudo apt upgrade
Note: It is an excellent habit to
reboot the system after
Linux Kernel and
Libs update. and I believe you know the command to reboot the system but I can remind you. It is
There is one more best practice, that is, removing the unused kernels and other packages. So to do this, there is a simple command, which you can find in the below line.
sudo apt --purge autoremove
Step 2: Installing update manager core package
Now, As we have installed the updates and upgraded the packages. It’s time to install the update manager core package. Sometimes it is installed by default, but making sure if it is installed or not, is good. So let’s do it.
sudo apt install update-manager-core
Step 3: Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS
Enough talk, it is just a command, So let’s run the command for the upgrade.
Please smile, if you are not getting any error messages but if you are getting an error message then we have to fix that. And, I don’t know that what error message are you getting. But if you are getting an error message similar to the below error then you have the solution right now but if it is different then you can write a comment or email me that error or, also you can google that. So check the error below.
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.
To resolve this error, you only have to use
-d the above command. So the final command will be as below.
sudo do-release-upgrade -d
You can see the prompt to say
y so it will continue.
That’s all about Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS. If you got the system after reboot then you have successfully upgraded it. Congratulations.
Step 4: Verifying the current Ubuntu version
Just for confirmation, you can use the below command to verify the Distro version. The command is very simple.
And you can also verify the kernel version and other log files using the below commands.
If you want to check the logs then use the command
tail -f /var/log/my-app.log
And Also you can check the kernel version
As a result, you can see the output.
Step 5: Enabling the third party disabled repo
Due to stability reasons, during the upgrade process, third-party repos like google chrome and any other will be disabled. So you can use either command-line or GUI to enable it. You can use the
cd command to go to the repos list directory.
So you can use the
ls command along with
-l to list that repos.
For example, we are going to look for the
google-chrome.list, and I will use the
As a result, you can see in the below output
### THIS FILE IS AUTOMATICALLY CONFIGURED ### #You may comment out this entry, but any other modifications may be lost. #deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to focal
So to fix this problem, you have to uncomment some lines for that I am going to use
vim but you can use nano or any other file editors program.
sudo vim google-chrome.list
So after uncommenting the lines, it will look like as below
### THIS FILE IS AUTOMATICALLY CONFIGURED ### #You may comment out this entry, but any other modifications may be lost. deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to focal
And now you can save the file by pressing the
Esc key and then typing
:wq and pressing
Enter key. Lastly, you can run the command for update and upgrade.
sudo apt update && sudo apt upgrade
So that’s all about the command-line upgrade. Also, you can take look at Ubuntu’s official website.
II: Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS through the Graphical User Interface.
If you want to use the graphical method then I am going to write a new article for that. Also, I am publishing it very soon.
In conclusion, you learned, How to upgrade from Ubuntu 18.04 LTS to 20.04 LTS. So I hope you understand, but if you have any questions then, you can ask in the comment section.
Also, you may like to read about it.