Skip to main content

In the terminal type, the following command:

sudo apt update

After typing the above command, enter your password.

Off the bat, this command doesn’t update your system. Instead, it updates your Ubuntu repositories.  So your system checks against the repositories. It checks if there are newer versions available of the program installed. It won’t update your existing packages right away; instead, it will update the information about the existing packages and their versions available. This is the reason that when this command finishes execution, Ubuntu shows you the number of packages that can be updated.

apt list --upgradable

sudo apt upgrade

After typing the above command you will be asked for your password, enter and click return or enter.

Otherwise, enter

sudo apt update && sudo apt upgrade -y

The && between the two commands chains the instructions.  The first part of the command 'sudo apt update' does exactly that - is run first.  After this has completed its execution, the next command is executed 'sudo apt upgrade -y'.  And so on the pattern continues if you have more commands.  The -y at the end will save you one keystroke where Ubuntu asks you whether you want to install the upgrades or not.

Related articles

Andrew Fletcher18 Mar 2024
Resolving CVE-2022-48624 less issue
To resolve the CVE-2022-48624 vulnerability on Ubuntu using Nginx, it's crucial to understand that the issue lies within the "less" package, not Nginx itself. The vulnerability affects "less" before version 606, where close_altfile in filename.c in less omits shell_quote calls for LESSCLOSE,...
Andrew Fletcher12 Mar 2024
How to determine the size of a directory in Terminal
To determine the size of a directory using the terminal, you can use the du (disk usage) command. The syntax for this command can vary slightly depending on the operating system you are using, but a common way to use it is as follows: For Linux and macOSdu -sh /path/to/directoryduDisk...
Andrew Fletcher06 Mar 2024
Terminal command to find and replace
In many terminal text editors, you use find command as reference in Terminal commands - find.  How about find and replace.  This action depends on the specific text editor you're using in the terminal.  Here are a few common terminal text editors and how you can find and replace...