How Do I Update Ubuntu Linux Software Using Command Line? [duplicate]

I'm new and I want to know how do I update Ubuntu Linux for security and application fix/upgrades using the ssh command line? How can I install updates via the command line option?


Solution 1:

"how do I update Ubuntu Linux for security and application fix/upgrades?"

A stock install of Ubuntu Desktop and Ubuntu Server will handle deb package security upgrades automatically. The system will also handle ALL snap package upgrades automatically. No user interaction is needed.

A stock install of Ubuntu Desktop will prompt you to install non-security deb upgrades when they are available.

Ubuntu Server lacks the desktop upgrade prompt, obviously. See https://help.ubuntu.com/community/AptGet/Howto for details on how to use the apt application to install/remove/upgrade deb packages.

Solution 2:

The basic CLI commands to use locally, or over SSH, would be...

sudo apt update

sudo apt upgrade

reboot # if required