Ubuntu -bash: do-release-upgrade: command not found nixCraft

I am using Ubuntu Linux 16.04 LTS cloud server. I followed this page to upgrade Ubuntu 16.04 to 18.04 but, I am getting an error that read as ‘ -bash: do-release-upgrade: command not found.’ Why am I not getting the Ubuntu 18.04 upgrade using do-release-upgrade and how do I fix this problem?

Introduction: Command not found error indicates that the do-release-upgrade tool not installed on your system or cloud server. It happens when you or your cloud hosting provider uses a minimal Ubuntu Linux 16.04 LTS image to build your cloud server.

 

Ubuntu -bash: do-release-upgrade: command not found

Here is a sample session:
$ uname -mrs
$ lsb_release -a
$ sudo do-release-upgrade -d

Ubuntu -bash: do-release-upgrade: command not found

How to fix do-release-upgrade: command not found error

You need to install package named ubuntu-release-upgrader-core that manages release upgrades. It is the core of the Ubuntu Release Upgrader. To install it, type the following apt command or apt-get command:
$ sudo apt install ubuntu-release-upgrader-core
How to install core of the Ubuntu Release Upgrader

How to upgrade Ubuntu 16.04 to 18.04

First update your current system by running the following command:
$ sudo apt update
$ sudo apt upgrade

Reboot the Linux system if a new Linux kernel was installed using the reboot command or shutdown command:
$ sudo reboot

Warning: Make sure you keep backups before you start upgrade procedure.

The do-release-upgrade command used to upgrade the operating system to the latest release from the command-line. This is the preferred command if the machine has no graphic environment or if the machine is to be upgraded over a remote connection such as ssh command. Now start the upgrade procedure:
$ sudo do-release-upgrade -d
Ubuntu upgrade operating system to latest release
Follow on-screen instructions. To finish the upgrade, a restart is required. At the end, you should be promoted to reboot the box as follow:
Ubuntu Linux system reboot required to finish updates

How to verify updated Ubuntu Linux 18.04 system

Find out the Linux kernel version, type:
$ uname -a
$ uname -mrs

Next find out Ubuntu Linux distro version, run:
$ lsb_release -a
Ubuntu Linux 18.04 LTS installed

 

 

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting.

Spread the love

Posted by News Monkey

blank