update ubuntu os code example

Example 1: how upgrade the thins upgradable in ubuntu

echo "sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade && sudo apt -y autoremove && sudo apt autoclean" > update && sudo mv update /usr/local/bin/update && sudo chmod +x /usr/local/bin/update

Example 2: update software in ubuntu

# Upgrades all applications
sudo apt-get upgrade

Example 3: ubuntu update

sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

Tags:

C Example