Raspbian Debian Software Updates: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 16: Line 16:
apt-get -y dist-upgrade
apt-get -y dist-upgrade
apt-get -y autoclean
apt-get -y autoclean
echo
echo
echo Updates Compelted
echo
    read -p "Reboot rPi? (y/N)" yn
    case $yn in
        [Yy]* ) reboot; exit;;
    esac
</pre>
</pre>



Revision as of 08:24, 17 June 2015

Create a script to update the operating system.

sudo vi /usr/sbin/update

add the following contents to file

#!/bin/bash

if [[ ${EUID} -ne 0 ]]; then
        echo " !!! This tool must be run as root"
        exit 1
fi

apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y autoclean

echo
echo
echo Updates Compelted
echo

    read -p "Reboot rPi? (y/N)" yn
    case $yn in
        [Yy]* ) reboot; exit;;
    esac

make file executable

sudo chmod +x /usr/sbin/update

execute script

sudo update

raspbian Firmware

This script already exists

sudo rpi-update