DEV Community

Cover image for How to upgrade Ubuntu with only one command
Patrick
Patrick

Posted on

How to upgrade Ubuntu with only one command

A few days ago I got a VPS server on which I have an outdated Ubuntu operating system, so I started researching how to upgrade the server to a newer version.

It's easier than it sounds.

First, we can connect to our server, we do this using an SSH client (I use MobaXterm)

Terminal successful connected

When we connected to our server.

First, we update all the software to keep the jump between programs to the smallest.

sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

And then again.

sudo apt-get upgrade
Enter fullscreen mode Exit fullscreen mode

Once the applications are updated, we can upgrade our operating system to the next LTS (Long Time Support) version with the command:

sudo do-release-upgrade
Enter fullscreen mode Exit fullscreen mode

The command has several options, but only the above command is enough to update.

Options of command

An upgrade report will be displayed below. This is accepted by entering Y and pressing theENTER key and the upgrade process will be performed.

Prompt for update

Then we wait. We will be notified in the meantime to choose a keyboard layout. We choose it according to what we have.

The process takes about 20 minutes, depending on your internet connection.

If everything went fine, then we restart the server with the command:

reboot
Enter fullscreen mode Exit fullscreen mode

If Ubuntu has been upgraded, check with the following command:

lsb_release -a
Enter fullscreen mode Exit fullscreen mode

I hope this guide was helpful.🤗

Top comments (0)