Operation Manual
If your search term brings up too many different packages to see on a single screen display, you can tell Linux that you want it to pause on each
screenfull by piping the output of apt-cache through a tool called less. Simply change the command to apt-cache search game | less and use the
cursor keys to scroll through the list. Press the letter Q on the keyboard to exit.
Installing Software
Once you know the name of the package you want to install, switch to the apt-get command in order to install it. Installing
software is a privilege afforded only to the root user, as it affects all users of the Pi. As a result, the commands will need to be
prefaced with sudo to tell the operating system that it should be run as the root user.
For example, to install the package thrust (a Linux version of a popular Commodore 64 game from days gone by), you would
simply use the install command with apt-get as follows:
sudo apt-get install thrust
Some packages rely on other packages in order to operate. A programming language may depend on a compiler, a game engine
on graphics files, or an audio player on codecs for playing back different formats. These are known in Linux terms as
dependencies.
Dependencies are one of the biggest reasons for using a package manager like apt rather than installing software manually. If a
package depends on other packages, apt will automatically find them (see Figure 2-5) and prepare them for installation. If this
happens, you’ll be shown a prompt asking whether you want to continue. If you do, type the letter Y and press the Enter key.
Figure 2-5: Apt listing the dependencies for the OpenOffice.org package