Skip to content

Instantly share code, notes, and snippets.

@jagottsicher
Created October 6, 2018 02:24
Show Gist options
  • Save jagottsicher/f890a8a48b2d393c7b1b3284b3b37bda to your computer and use it in GitHub Desktop.
Save jagottsicher/f890a8a48b2d393c7b1b3284b3b37bda to your computer and use it in GitHub Desktop.
auto dist upgrade - shell script (/bin/bash) skips confirmation, for Raspi and other Linux (Debian, Ubuntu, aso)
#!/bin/bash
# if not root, run as root
if (( $EUID != 0 )); then
sudo /home/pi/auto-dist-upgrade.sh
exit
fi
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get clean
apt-get -y autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment