Know How To Upgrade Ubuntu From Command Line

Upgrading Ubuntu is very easy! even a novice user can easily upgrade Ubuntu from one version to another in the first attempt. Here we will know four steps to upgrade ubuntu from the command line, the steps are stated below you have to do work stepwise.


Here You Need To Do For Upgrade Ubuntu From Command Line


  • Require Stable Internet Connection And Backup Data

The firsts most important step is to stay connected with a stable network until the full process completed. You can check your internet connection through transmitting packets using the ping command,  ping  google.com  -c  2. If you will receive two transmitted packets then you will be ready for the next process.Netgear

If you want to check your Ubuntu version you run the command, lsb_release  -a.

Then, you backup all your data to the cloud or another system, this step is for protection from any data loss.


  •   From the Terminal Update Ubuntu (From Command Line)

Ubuntu with its newer releases every time includes the latest version of packages, so you should update your current list of packages to their latest version. During installation, this process helps by restricting any package conflict.Ubuntu Terminal Update

You required to update your system to begin the upgrade process.

To update Ubuntu along with package upgrade, you just run the single line command:

sudo  apt  update  &&  sudo  apt  upgrade

There the ‘&&’ separate ‘apt  update’ and ‘apt  upgrade’. The ‘apt update’  just updates the list of available packages and their version, and the ‘apt upgrade’ installs newer versions of packages from the updated list. That’s why you can run both commands individually (stated below) which will also present similar results.

sudo  apt  update

sudo  apt  upgrade

After finishing the update process, you just run a command to reboot your system:

sudo  reboot


Read Also: Must Know 5 Amazing Facts About Ubuntu Linux


  • Find out a new release

To now the new version’s viability you can use a command-line tool, that is ‘do-release-upgrade’. From the manual, you can read the full details of this command.Ubuntu Update

man  do-release-upgrade

Let run the following command to check out the viability of the latest version,

sudo  do-release-upgrade

At the time when you run the command, if there any new version has not come then this will show you the result “no new releases”, and if a new version has come then you will also get the information of the version, that means, which version has released.

If by default, the command support a default config value to searches for any new release, you can check your default settings from the ‘/etc/update-manager/release-upgrades’ file. Type y, if you evoke to choose, and if you want to edit the settings to replace normal with LTS to check only for the new LTS release, then type N.

sudo  vim  /etc/update-manager/release-upgrades

To install the latest development version of Ubuntu 20.04, you can use the -d flag.


  •   Upgrade Ubuntu Using A Single Command Line

Run the following command to install the beta version of Ubuntu 20.04.

sudo  do-release-upgrade  -d  -m  desktopUbuntu SIngle Update

[NOTE: ‘M’ INDICATE THE MODE OF THE OPERATING SYSTEM TO EIGHTER Ubuntu Server OR Desktop.]

Next, you have to reboot the system after updating Ubuntu, and then run the same command again and start to upgrade Ubuntu. This will prompt you to choose Yes or No by asking you to want to start the upgrade or not. You type Y for Yes or N for No.

When the download finished this will start upgrading. Once it upgraded, it will remove old packages and restart your system, though the procedure will take some time. When all things will be done, you just reboot the system and get the new Ubuntu 20.04 version.

[ IMPORTANT-NOTE: IF YOUR UBUNTU VERSION IS 18.04 OR 19.10 THEN YOU ARE ABLE TO UPGRADE UBUNTU BY COMMAND. YOU  CANNOT UPGRADE TO UBUNTU 20.04 DIRECTLY FROM UBUNTU 16, 17, 18.10, 19.04. THIS ABOVE MENTIONED WAY IS APPLICABLE FOR UPGRADING TO UBUNTU  FORM 18.04 LTS OR 19.10 TO UBUNTU 20.04 LTS (BETA). ]


You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share
%d bloggers like this: