How To Upgrade Ubuntu With A Single Command

0 133

Upgrading Ubuntu is very easy! Even a novice user can easily upgrade Ubuntu from one version to another in the first attempt itself. That’s why I always recommended Ubuntu for newbies who wants to try Linux for the first time. However, a developer has made the upgrade process a lot easier than ever. Meet zzupdate, a simple command line utility to fully update an Ubuntu PC/server via apt, mostly hands-off and unattended. Believe me or not, You can now upgrade your Ubuntu, either Desktop or Server edition, with a single command. I tested this script in Ubuntu 18.04 LTS and it worked just fine as described below. Read on.

Features

  • Automatic unattended upgrade.
  • User intervention or any coding knowledge is not required.
  • Easy to install and use. Just download and start using it in no time.
  • Free and open source. The source code is freely available in GitHub.

zzupdate – Upgrade Ubuntu With A Single Command

The official and recommended way to upgrade any Ubuntu version to the next available version is to run the following commands one by one and follow the onscreen instructions.

For Ubuntu Desktop:

$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo reboot
$ sudo update-manager -d

For Ubuntu Server:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo reboot
$ sudo do-release-upgrade -d

However, you don’t need to run all those commands to upgrade Ubuntu. The zzupdate upgrades any Ubuntu version in a single command.

First, open up the Software & updates either from Gnome Dash or application launcher.

Open software and updates

Open software and updates

In the Software & updates wizard, go to Updates section and choose the version type you want to upgrade.

If you want to upgrade the current Ubuntu version to any available new version (LTS or non-LTS), choose “For any new version” from the “notify me of new Ubuntu version” drop down box.

If you want to upgrade the current Ubuntu version to next available LTS version only, choose “For long-term support versions” from the “notify me of new Ubuntu version” drop down box in the Updates section.

Choose version type

Choose Ubuntu version type

Once you have chosen the version type, close the “Software & Updates” window.

Next, download “zzupdate” utility using command:

$ curl -s https://raw.githubusercontent.com/TurboLabIt/zzupdate/master/setup.sh | sudo sh

Sample output would be:

[...]
Installing...
-------------
Cloning into 'zzupdate'...
remote: Counting objects: 96, done.
remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96
Unpacking objects: 100% (96/96), done.
Already up to date.
Setup completed!
----------------
See https://github.com/TurboLabIt/zzupdate for the quickstart guide.

Then,run the following command to upgrade Ubuntu:

$ sudo zzupdate

It’s that simple. You don’t need to do anything. zzupdate will take care of everything and upgrade your current Ubuntu version to next available version.

zzupdate

zzupdate in action

Once the upgrade process is completed, Zzupdate will automatically reboot your system to newly upgraded system.

Here is the my Ubuntu 18.10 desktop after upgrading from Ubuntu 18.04 LTS:

Ubuntu 18.10 desktop

Ubuntu 18.10 desktop


Note for those who updating their Ubuntu via SSH session:

In case you’re upgrading via SSH, it is recommended to start the upgrade process within screen session. Because in case of any SSH connectivity failure during upgrade process, you can easily reconnect with the upgrade session.

To install the screen tool, run:

$ sudo apt-get install screen

Then start the screen session using command:

$ screen

In case of any connectivity failure, you can re-attach to the upgrade session with command:

$ screen -Dr

Now, run the following command to upgrade Ubuntu:

$ sudo zzupdate

Configure zzupdate

zzupdate works just fine out of the box. However, if you want to change some parameters (such as, to exclude reboot, version aggression), you’re free to do that by modifying the config file.

Copy the default config file:

$ sudo cp /usr/local/turbolab.it/zzupdate/zzupdate.default.conf /etc/turbolab.it/zzupdate.conf

Edit the configuration file:

$ sudo vi /etc/turbolab.it/zzupdate.conf

Then, modify the parameters as per your requirement.

Here is the list of available parameters.

  • REBOOT – If the value is 1, the system will be restarted at end of the upgrade process. Default is 1.
  • REBOOT_TIMEOUT – Reboot default time out value. Default value is 15.
  • VERSION_UPGRADE – If the value is 1, it executes version progression if a new version of Ubuntu is available.
  • VERSION_UPGRADE_SILENT – If the value is 1, version progression occurs automatically, without asking the user anything. Default value is 0.
  • COMPOSER_UPGRADE – If the value is 1, it automatically upgrades composer.

By default, we run “zzupdate” to upgrade Ubuntu with default parameters. We can also create different profiles with specific parameter(s).

To do so, create a specific profile by copying from the default config file:

$ sudo cp /usr/local/turbolab.it/zzupdate/zzupdate.default.conf /etc/turbolab.it/zzupdate.profile.ostechnix.conf

Please note that, I have used “ostechnix” in the profile name.

Then, modify the default available parameters as per your requirement.

$ sudo vi /etc/turbolab.it/zzupdate.profile.ostechnix.conf
REBOOT=0
REBOOT_TIMEOUT=10
VERSION_UPGRADE=1

Save and close the file. Now, you can start the upgrade process using the specified profile name as shown below.

$ sudo zzupdate ostechnix

Similarly, you can create as many as profiles with different parameters.


Suggested read:


And, that’s all for now. Hope this helps. Have you tried this utility already? Share your thoughts about this utility in the comment section below. If you find this guide useful, please share it on your social, professional networks and support OSTechNix!

More good stuffs to come. Stay tuned!

Cheers!

Resource:

Source : Visit

You might also like More from author

Leave A Reply

Your email address will not be published.