Updating Linux using CLI

I have installed Linux on my computer, but how can I manually update it?

Well, here’s a way to do it. In this quick tutorial, I am going to show, to update your system using the command line interface.

Please note that this tutorial is targeted for new Linux users. So it doesn’t include any advanced options/ flags for updating system. Nor does it include any command for upgrading/ downgrading any specific packages. I will soon write another tutorial with advance commands/ flags for upgrading and downgrading packages.

For successfully installing updates in your system’s open Terminal application and type/ paste following commands according to your distro of choice. After pasting bellow commands you will see a system prompt showing available updates and update size. Enter y to continue installing updates.

Debian/ Ubuntu:

sudo apt update

Fetches the list of available updates.

sudo apt upgrade

Upgrades currently installed packages.

sudo apt dist-upgrade

Installs new updates.

OpenSUSE Leap/ Tumbleweed

sudo zypper ref

Fetches the list of available updates. ref is the short form used for refresh.

sudo zypper up

Upgrades currently installed packages. up is the short form used for update.

CentOS/ Fedora 21 or earlier

sudo yum update

Fedora 22 or later

sudo dnf update

Arch Linux:

sudo pacman -Syu

And that’s it. If you find any grammatical mistakes, have any suggestions or if you want to request a new tutorial feel free to comment it out.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s