Created
August 6, 2017 13:39
-
-
Save enwi/ad439b56a31986912d853a13f9d3bd42 to your computer and use it in GitHub Desktop.
Simple shell script that updates your linux. If you only want error messages then uncomment the comments in each line.
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 | |
RED='\033[0;31m' | |
GREEN='\033[1;32m' | |
BLUE='\033[1;34m' | |
NC='\033[0m' # No Color | |
echo -e "${BLUE}System update${NC}" | |
sudo apt-get update #2>&1 >/dev/null | |
echo -e "${BLUE}System upgrade${NC}" | |
sudo apt-get upgrade -y #2>&1 >/dev/null | |
echo -e "${BLUE}Dist upgrade${NC}" | |
sudo apt-get dist-upgrade -y #2>&1 >/dev/null | |
echo -e "${BLUE}Cleaning up${NC}" | |
sudo apt-get autoremove -y #2>&1 >/dev/null | |
sudo apt-get clean #2>&1 >/dev/null | |
sudo apt-get autoclean -y #2>&1 >/dev/null | |
if [ "$1" = "-reboot" ] ; then | |
echo -e "${GREEN}Done!${BLUE}Rebooting now!${NC}" | |
sudo reboot | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment