How To Update Ubuntu From The Terminal

Ubuntu Sign in to your XDA account One of Ubuntu’s major selling points (without actual cost) is the user-friendly UI and UX. It’s one of our all-time favorite Linux distributions … Read more

Taylor Bell

Taylor Bell

Published on Jul 12, 2024

How To Update Ubuntu From The Terminal
Ubuntu

4

4

Sign in to your XDA account

20231207_191859416_iOS

One of Ubuntu’s major selling points (without actual cost) is the user-friendly UI and UX. It’s one of our all-time favorite Linux distributions due to how easy it is to use. If you seek a break from Microsoft’s Windows 11, Ubuntu can prove worthwhile, so long as you don’t mind learning the command line interface. It’s nowhere near as required as it used to be and pretty much everything can be achieved through the GUI, but using the terminal is fun, fast, and just as easy once you memorize commands. We’ll quickly show you how to update the OS through the terminal.

PC specs screen in Ubuntu

Related

5 best Linux distributions in 2023

Thinking about switching from MacOS, Windows, or ChromeOS to Linux? You have a ton of distributions or “flavors” of the OS to choose from.

How to update Ubuntu from the terminal

To update Ubuntu from the terminal, first launch a session with Ctrl, Altand T or hit the Windows key and search “terminal”. Once launched, you’ll be presented with the command line interface (also known as CLI). Before updating the system and its packages, we need to check if any new versions are available in the repositories. We’ll be using sudo, which provides us with temporary enhanced permissions. It’s perfectly safe and is commonly used for running commands on Linux.

sudo apt update is what will usually upgrade the database of available packages for you. Think of it as checking for available updates. The end of this command when used separately will show how many packages can be upgraded. Packages not only include security and OS updates but also app updates for the apps you have installed with apt. The second command sudo apt upgrade is what will upgrade your Ubuntu, and install any of those new updates available for you. Think of this as actually installing updates.

  1. Open the terminal.
  2. Check for Ubuntu package updates:
    sudo apt update
  3. Enter your Ubuntu account password.
  4. If updates are available, run the updater:
    sudo apt upgrade

If you want to be clever, we can combine both commands. To run sudo apt update and sudo apt upgrade commands with a single entry, we’d need to input sudo apt update && sudo apt upgrade -y. Typically, you can run them separately, but it’s better to combine them.

A screenshot of the terminal and a prompt to upgrade ubuntu through the terminal

Since we combine both commands here with the && (yes, it’s two of them) and confirm it with -y to automatically accept any changes, we’re saving a bit of time during the upgrade process.

One of the more basic things to do on Ubuntu

Updating Ubuntu from the terminal is just one thing that you should consider doing for the security of your operating system. You might also want to mount drives, so the system can access them without any problems. We also can’t forget another basic, like changing the password, too. Hopefully, our guide answered your question, and you’re now up and running with a fully updated Ubuntu system with the latest patches.

Ubuntu popup screen on a desktop

Related

How to log in as root in Ubuntu

The root access in Ubuntu gives you full access to edit configuration files and other administrative tasks. Here’s how to log in as root.

Partager cet article

Inscrivez-vous à notre newsletter