Update Ubuntu through terminal

Ubuntu Update Upgrade dist-upgrade

How do I update Ubuntu using the terminal?

  1. Open the terminal application
  2. For remote servers use the ssh command to login (e.g. ssh user@example.com)
  3. Fetch update software list by running sudo apt-get update command
  4. Update Ubuntu software by running sudo apt-get upgrade command
  5. Distribution Upgrade of Ubuntu running sudo apt-get dist-upgrade command
  6. Reboot the Ubuntu if required by running sudo init 6

Let us see all commands in detail.

How do I upgrade Ubuntu using the terminal?

You need to use either apt command or apt-get command. The apt command provides a command line interface for the package management system. we can install new packages, update packages, remove/delete packages and perform other administrative duties for package management using apt.

How to get the package index files from their sources via the Internet

Run the command:

$ sudo apt-get update

or

$ sudo apt update

 

How to get upgraded packages on any Ubuntu/Debian based operating system

$ sudo apt-get upgrade

or

$ sudo apt upgrade