How to upgrade Ubuntu in command line

I was trying to upgrade Ubuntu in command line. I would like to share the commands in this post.

There are two simple commands to upgrade the version of Ubuntu distribution.

sudo apt-get update
sudo apt-get dist-upgrade

These commands perform smart update of Ubuntu.