Update Raspberry Pi - how it works
Your software should always be up to date - this also applies to the Raspberry Pi. You can find out how to update your Raspberry Pi in this guide. We will go into the most frequently used operating system Raspbian.
Raspberry Pi: update the installed packages
To update the packages installed on the Raspberry Pi - which contain the programs, libraries and drivers - you have to do the following:
- Open the console of your Raspberry Pi.
- Enter the command "sudo apt-get update" and execute it.
- The mini PC now downloads the new package list to see which packages a newer version is available for.
- Now check with the command "df -h" how much space is free on your Raspberry Pi.
- Then enter the command "sudo apt-get upgrade" and confirm with "Enter".
- Before the new packages are installed with the previously entered command, you will receive a message as to how much storage space is required for this. If this is not sufficient, you have to cancel the upgrade with "N" and provide additional storage space.
- If you have enough free space, perform the upgrade with "Y".
- As soon as the update was successful, you should restart your Raspberry Pi with the command "sudo reboot".
Raspberry Pi: Update operating system
Occasionally, a new update for the operating system comes out. The release update is comparable to an update from approximately Windows 7 to Windows 8.1. We have listed below how you have to proceed:
- Note: A release update takes a lot of time. Depending on the speed of the Raspberry Pi, the update can take several hours. So plan a lot of time accordingly. It can also happen that some programs no longer work properly under the new release. A release update should therefore only be carried out by an experienced user.
- We recommend that you back up your operating system before the update so that you can restore the old version in the event of an error.
- Now open the console and start the command "sudo nano /etc/apt/sources.list".
- Find the name of your current release in the list - e.g. wheezy - and enter the name of the new release there instead - e.g. jessie.
- Download the current package list with the command "sudo apt-get update".
- Now use the "df -h" command to check how much space is still free on your Raspberry Pi.
- Then enter the command "sudo apt-get dist-upgrade" and confirm with "Enter". Your system will now be updated to the new release.
- After the update has finished, restart the Raspberry Pi with "sudo reboot".
- If the update was successful, you can check the functions of your system. If some functions are not yet working properly, you have to adapt the configuration files accordingly.
Raspberry Pi: update firmware
There are more and more accessories for the Raspberry Pi. In order for this to work properly, a firmware update is sometimes necessary. To do this, proceed as follows.
- Open the console and download the program git with "sudo apt-get install git".
- Then download the firmware update script. To do this, type "sudo wget //raw.github.com/Hexxeh/rpi-update/master/rpi-update -O / usr / bin / rpi-update && sudo chmod + x / usr / bin / rpi-update" in the console.
- The script is now saved and executable.
- Execute the firmware update with "sudo rpi-update".
- After the firmware has been updated, you still have to restart your Raspberry Pi with "sudo reboot". Your firmware is then up to date.
Note: The steps described here apply to a Raspberry Pi with the Raspbian operating system. In the next practical tip, we will introduce you to the best accessories for your Raspberry Pi.