Executing commands with privileges (sudo)

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.

Getting ready

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 ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.