Keeping your system up-to-date
A community effort such as Raspbian and the Debian distribution on which it is based, is constantly being worked on and improved by hundreds of developers every day. All of them are trying hard to make the Pi run as smoothly as possible, support as many different peripherals as possible, and to squish any discovered software bugs.
All those improvements come to you in the form of package and firmware updates. To keep your Raspbian OS up-to-date, you need to know the following two commands:
sudo apt-get update
: To fetch information about what packages have been updated.sudo apt-get dist-upgrade
: Proceed to install the updated packages. Answer yes when prompted.
The firmware updates are more related to the Raspberry Pi hardware and may contain improvements to the Linux kernel, new drivers for USB gadgets, or system stability fixes. To upgrade the firmware, we'll use a script called rpi-update
written by Hexxeh. Type in the following command to install the script:
pi@raspberrypi ~ $ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
Before we can use the script, we need to install Git, a version control system used by the Raspberry Pi firmware developers, with the following command:
pi@raspberrypi ~ $ sudo apt-get install git-core
Notice how easy it is to download and install new software packages from the Internet using apt-get
.
Now, whenever you want to check for firmware updates, type sudo rpi-update
and reboot once the script says it has updated your system successfully.