The_Official_Raspberry_Pi_-_Beginner’s_Book_Vol1,_2018 (1)

(singke) #1

226 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE


These switches control the ls command: l switches its output into a long vertical list;
a tells it to show all files and directories, including ones that would normally be hidden; r
reverses the normal sort order; t sorts by modification time, which combined with r gives you
the oldest files at the top of the list and the newest files at the bottom; and h uses human-
readable file sizes, making the list easier to understand.

Running programs
Some programs can only be run at the command line, while others have both graphical and
command-line interfaces. An example of the latter is the Raspberry Pi Software Configuration
Tool, which you would normally load from the raspberry icon menu.
Type:

raspi-config

You’ll be given an error telling you that the software can only be run as root, the superuser
account on the Raspberry Pi. It will also tell you how to do that, by typing:

sudo raspi-config

The sudo part of the command means switch-user do, and tells Raspbian to run the
command as the root user.

You’ll only need to use sudo when a program needs elevated privileges, such as when it’s
installing or uninstalling software or adjusting system settings. A game, for example, should
never be run using sudo.
Press the TAB key twice to select Finish and press ENTER to quit the Raspberry Pi Software
Configuration Tool and return to the command-line interface. Finally, type:

exit
Free download pdf