Why You Should Update Via 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 happening 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 will work on most Ubuntu-based distributions, like Linux Mint and Kali Linux.
Keep in mind going forward, however, that any time you upgrade Ubuntu software, you’ll need to have administrative privileges. That means you’ll always be asked to confirm your password.
Update Ubuntu in the Terminal
The Ubuntu update command is apt, or sometimes apt-get. Apt is Ubuntu’s primary package manager.
Using the update option tells apt to search your software repositories (everything listed in /etc/apt/sources.list) and take inventory of what Ubuntu package updates are available.
Note: You might see certain Linux guides telling you to use apt-get, like sudo apt-get update, instead 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.
Once the update command has completed, you’ll be ready to apply the package updates using the upgrade option.
The above command will apply all upgrades found in the previous update command as long as they don’t require removal of any already installed packages. If some packages seem to refuse to upgrade, using the full-upgrade option, which can remove certain packages, may resolve the problem.
Learn More: The Basic Commands to Get You Started With Linux
With either command, after listing out the available upgrades, you’ll be asked to confirm the installation by entering y or yes.
You can skip the confirmation by adding the -y flag to the end of an upgrade command, and you can combine both update and upgrade into one command by utilizing the && operator.
Update Ubuntu Server in the Command Line
Updating an Ubuntu server is essentially the same experience as updating an Ubuntu desktop through the command line.
However, in this instance, you should use apt-get instead of apt, and follow the upgrade with the dist-upgrade option to ensure your server stays completely up to date.
Update Ubuntu via SSH
If you’ve set up an SSH connection with your Ubuntu system, you can upgrade remotely and securely after signing into your SSH.
Make sure you 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 using it safely, and with all the latest Linux features.
Some Linux apps you won’t actually find in the software store or apt repositories. We’ve gathered several websites that offer the best in DEB downloads that will work with Ubuntu.