Operation Manual
Package A collection of files required to run an application, typically handled by the package manager.
Package manager A tool for keeping track of, and installing new, software.
Partition A section of a hard drive which is ready to have a file system applied to it for storage.
Root The main user account in Linux, equivalent to the Windows administrator account.
Shell A text-based command prompt, loaded in a terminal.
sudo A program that allows restricted users to run a command as the root user.
Superuser See Root.
Terminal A text-based command prompt in which the user interacts with a shell program.
X11 The X Window system, a package that provides a graphical user interface (GUI).
Linux Basics
Although there are hundreds of different Linux distributions available, they all share a common set of tools. These tools, which
are operated via the terminal, are analogous to similar tools on Windows and OS X. To get started, you’ll need to learn the
following commands:
• ls—Short for listing, ls provides a list of the contents of the current directory. Alternatively, it can be called with an
argument of the directory to be listed. As an example, typing ls /home will provide a list of the contents of /home,
regardless of your current directory. The Windows equivalent is dir.
• cd—An initialism of change directory, cd allows you to navigate your way through the file system. Typing cd on its own
puts you back in your home directory. Typing the command along with the name of the directory you wish to move to, by
contrast, switches to that directory. Note that directories can be absolute or relative: cd boot will move you to the directory
called boot under your current directory, but cd /boot will move you straight to the /boot directory wherever you are.
• mv—The move command has two purposes in Linux: it allows a file to be moved from one directory to another, and it also
allows files to be renamed. That latter feature may seem out of place, but in Linux terms, the file is being moved from one
name to another. The command is called as mv oldfile newfile.
• rm—Short for remove, rm deletes files. Any file—or list of files—provided after the command name will be deleted. The
Windows equivalent is del, and the two share a common requirement that care should be taken to ensure the right file is
deleted.
• rmdir—By itself, rm cannot usually remove directories. As a result, rmdir is provided to delete directories once they have
been emptied of files by rm.
• mkdir—The opposite of rmdir, the mkdir command creates new directories. For example, typing mkdir myfolder at
the terminal will create a new directory called myfolder under the current working directory. As with cd, directories
provided to the command can be relative or absolute.
Introducing Debian
Debian is one of the oldest Linux distributions around, and a great choice for the Raspberry Pi thanks to its lightweight nature.
This is why the Raspberry Pi Foundation has chosen it to be the recommended software for newcomers, and the one used for
the examples in this book.
To keep the download size to a minimum, the Raspberry Pi image for Debian includes only a subset of the software you’d find
on a regular desktop version. These include tools for browsing the web, programming in Python, and using the Pi with a GUI.
Additional software can be quickly installed though the use of the distribution’s package manager apt.
The Raspberry Pi build of Debian includes a desktop environment known as the Lightweight X11 Desktop Environment
(LXDE). Designed to offer an attractive user interface using the X Window System software, LXDE provides a familiar point-
and-click interface which will be immediately accessible to anyone who has used Windows, OS X or other GUI-based operating
systems in the past.
The GUI doesn’t load by default in most Raspberry Pi distributions. To quickly load it and leave the text-based console behind, log in, type startx
and then press the Enter key.
If you’re using the recommended Debian distribution, you’ll find that you have plenty of preinstalled software to get started.
While hardly an exhaustive example of the software available for the Pi, which numbers in the thousands of packages, it’s a good
introduction to precisely what the system can do.