Staying up-to-date (Intermediate)

This task will describe how to keep the Raspberry Pi operating system up-to-date by using raspi-config, rpi-update, and apt-get.

Getting ready

You will need:

  • A Raspberry Pi
  • An SD Card with the official Raspberry Pi OS, Raspbian, properly loaded
  • A USB keyboard
  • A USB mouse
  • A 5V 1A power supply with Micro-USB connector
  • A network connection
  • And a screen hooked up to your Raspberry Pi

How to do it...

  1. At the command line, enter sudo apt-get update.
  2. When that has finished, enter sudo apt-get upgrade.
  3. Answer yes to any prompts that ask for confirmation.
  4. Reboot your Raspberry Pi by entering sudo reboot.
  5. After logging back in, enter sudo rpi-update into the terminal.
  6. Select the defaults that are presented.
  7. Reboot your Raspberry Pi by entering sudo reboot.
  8. After logging back in, enter into the terminal sudo raspi-config.
  9. From the menu, scroll down to the Update option, and press Enter.
  10. When that is complete press the right key to select finish, and press Enter.
  11. If prompted to reboot, select Yes.
  12. Your Raspberry Pi operating system, firmware, and configuration panel are now up-to-date.

How it works...

The Advanced Packaging Tool (APT) is a standard package manager for Linux, specifically Debian, which is what Raspbian is built on. A package manager manages all the programs, games, and supporting files (known as dependencies) that are installed into your system. Periodically, the list of new packages is updated, so it is recommended to run apt-get update once a month. We have to use sudo, because apt-get needs to be run as root. An apt-get upgrade checks the list of installed packages against the list of what has been updated, and if it finds anything it will try to upgrade those packages. Running an apt-get upgrade is recommended at least once a month to stay updated against security flaws, exploits, and bug fixes.

Rpi-update is an open source program included in the latest versions of Raspbian that facilitates the easy upgrading of firmware on the Raspberry Pi. The firmware is code that is loaded before the operating system boots, sets all of the hardware up, and activates features on the board. Firmware updates have been released to support newer SD cards, better USB support, more video codecs, faster video performance, as well as other little bug fixes and feature enhancements.

Raspi-config is another open source tool included in all versions of Raspbian. Raspi-config is the first program activated after a successful boot-up on a new installation. The software helps you configure Raspberry Pi to your liking, with options including memory splits, keyboard layout, overclocking, and many other settings. Running the update option will check for and install newer versions of raspi-config, enabling you to access new built-in features of the Raspberry Pi.

There's more...

A few useful reference links:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.228.40