This recipe shows how you can execute privileged commands using sudo
.
The default Raspberry Pi user (pi
) is an ordinary user and not a super-user. The sudo
command is used to temporarily grant an ordinary user the privileges of a super-user.
After you've completed this recipe, you will be able to execute commands with super-user privileges by using sudo
as a command prefix.
The following ingredients are required for this recipe:
You need an initial setup or a basic networking setup for the Raspberry Pi that has been powered on. You also need to be logged in as the user whose username is
pi
(refer to the recipes in Chapter 1, Installation and Setup, for instructions on how to boot and log in and the recipes given later in this chapter for instructions on how to log in remotely).A network connection is an optional requirement.
If the Raspberry Pi has remote access enabled, this recipe can be completed remotely using SSH or PuTTY (refer to the...