Linux Basics; Introducing Debian - Raspberry Pi User Manual

Hide thumbs Also See for Raspberry Pi:
Table of Contents

Advertisement

30

Linux Basics

Although there are hundreds of different Linux distributions available, they all share a com-
mon 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:

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 brows-
ing 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
R A S P B E R R Y P I
❍ ls—Short for listing,
Alternatively, it can be called with an argument of the directory to be listed . As an
example, typing
ls /home
your current directory . The Windows equivalent is
❍ cd—An initialism of change directory,
system . Typing
on its own puts you back in your home directory . Typing the command
cd
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:
the directory called
boot
straight to the
/boot
❍ 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
❍ rm—Short for remove,
command name will be deleted . The Windows equivalent is
common requirement that care should be taken to ensure the right file is deleted .
❍ rmdir—By itself,
rm
to delete directories once they have been emptied of files by
❍ mkdir—The opposite of
example, typing
mkdir myfolder
under the current working directory . As with
myfolder
the command can be relative or absolute .
U S E R G U I D E 
provides a list of the contents of the current directory .
ls
will provide a list of the contents of
allows you to navigate your way through the file
cd
under your current directory, but
directory wherever you are .
mv oldfile newfile
deletes files . Any file—or list of files—provided after the
rm
cannot usually remove directories . As a result,
, the
rmdir
mkdir
at the terminal will create a new directory called
/home
.
dir
will move you to
cd boot
cd /boot
.
, and the two share a
del
rmdir
.
rm
command creates new directories . For
, directories provided to
cd
apt.
, regardless of
will move you
is provided

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents