Last active
October 17, 2024 09:02
-
-
Save bocharsky-bw/fc692baacc07f0e430d5 to your computer and use it in GitHub Desktop.
Shell Script for Upgrade Ubuntu via APT in one step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TEXT_RESET='\e[0m' | |
TEXT_YELLOW='\e[0;33m' | |
TEXT_RED_B='\e[1;31m' | |
sudo apt-get update | |
echo -e $TEXT_YELLOW | |
echo 'APT update finished...' | |
echo -e $TEXT_RESET | |
sudo apt-get dist-upgrade | |
echo -e $TEXT_YELLOW | |
echo 'APT distributive upgrade finished...' | |
echo -e $TEXT_RESET | |
sudo apt-get upgrade | |
echo -e $TEXT_YELLOW | |
echo 'APT upgrade finished...' | |
echo -e $TEXT_RESET | |
sudo apt-get autoremove | |
echo -e $TEXT_YELLOW | |
echo 'APT auto remove finished...' | |
echo -e $TEXT_RESET | |
if [ -f /var/run/reboot-required ]; then | |
echo -e $TEXT_RED_B | |
echo 'Reboot required!' | |
echo -e $TEXT_RESET | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sorry my bad.. i had messed it up on my end. thanks. it works fine for me too