There are 3 commands for the update.
Single command for all versions like Ubuntu 16.04 LTS, 18.04 LTS, etc.
To update in a single line;
First, if we aren’t root, let’s become root;
sudo su -
After that;
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
When you run the command above, it asks questions on a pinkish-gray screen. You can press enter, enter to pass through all of them.
In some places, it says it will download X MB. Type ‘y’ and press enter.
Let’s restart when the process is finished.
reboot
Once the machine is back, if there are unnecessary packages etc., clean them with the command below and the process is complete.
sudo apt-get autoremove