The best way to Replace Ubuntu within the Command Line

Do you want to update Ubuntu quickly and easily? Here's how to open a terminal prompt and install Ubuntu from the command line.

Update Ubuntu on the command line with an update icon

Knowing how to update Linux on the command line is an absolute must for experienced users. If you keep up to date, your system will be safe and with the latest features. Today we're learning how to update an Ubuntu desktop or server from the terminal or over an SSH connection.

Why you should update from the command line

Why use the command line to update Linux?

Because it's often faster than using a GUI tool like Software Updater and you can see the updates in real time. It's also one of the easiest commands to learn, as you're about to find out.

In addition to Ubuntu, these instructions work on most Ubuntu-based distributions such as Linux Mint and Kali Linux.

Ubuntu distros difference

Note, however, that you must have administrative privileges every time you upgrade Ubuntu software. That means you will always be asked to confirm your password.

Related: How to Add a User on Linux

Update Ubuntu in Terminal

The Ubuntu update command is suitable, or sometimes apt-get. Apt is Ubuntu's primary package manager.

Use of To update This option allows apt to search your software repositories (all in /etc/apt/sources.list) and take an inventory of available Ubuntu package updates.

sudo apt update

Note: You may see certain Linux manuals asking you to use apt-get, such as: sudo apt-get updateinstead of apt. Don't be confused: both commands perform the same function, but we recommend apt over apt-get as it's a little more user-friendly.

Apt update command in the Ubuntu terminal

Once the update command is complete, you can apply the package updates using Update Possibility.

Sudo Apt Upgrade

The above command applies any upgrades found in the previous upgrade command, provided there are no packages that have already been installed to be removed. If some packages refuse to upgrade, use the full upgrade The option to remove certain packages can fix the problem.

More information: The basic commands to get started with Linux

With both commands you will be asked to confirm the installation after listing the available upgrades y or Yes.

You can skip the confirmation by adding the -y Check to the end of an upgrade command, and you can combine both update and upgrade into one command by using the command && Operator.

sudo apt update && sudo apt upgrade -y

Update Ubuntu Server from the command line

Updating an Ubuntu server is essentially the same as updating an Ubuntu desktop from the command line.

In this case, however, you should use apt-get instead of apt, and follow the upgrade with the dist upgrade Option to ensure that your server is completely up to date.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Update Ubuntu via SSH

Once you've made an SSH connection to your Ubuntu system, you can update remotely and securely after logging into your SSH.

ssh username@REMOTE.IP.ADDRESS.HERE
sudo apt-get update
sudo apt-get upgrade

Make sure to replace "Username" and "REMOTE.IP.ADDRESS.HERE" with the appropriate information.

Ubuntu package upgrades

Your Ubuntu system is now updated and ready for you to continue to use it safely and with the latest Linux features.

Some Linux apps cannot be found in the software store or in suitable repositories. We have compiled several websites that have the best DEB downloads that work with Ubuntu.

deb-rpm-linux

8 websites to download DEB or RPM Linux apps

Are you looking for Linux apps? Instead of installing from the terminal, you can download Linux apps in DEB and RPM formats from these websites.

About the author

Jordan Gloor
(22 articles published)

Jordan is a tutor and journalist who is passionate about making Linux accessible and stress-free for everyone. He has a BA in English and a hot tea thing. During the warmer months of the year he enjoys cycling on the Ozark hills where he lives.

More
By Jordan Gloor

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!

One more step …!

Please confirm your email address in the email we just sent you.

. "border =" 0

Leave a Reply

Your email address will not be published. Required fields are marked *