O'Reilly logo

Getting Started with Cubieboard by Olliver M. Schinagl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running commands as root

Very often, when administering or setting up a system, certain commands need to be executed as root. The sudo command, when set up properly, can be used to allow certain users to execute certain commands as root. The who and what queries are controlled via the sudoers file at /etc/sudoers and should be edited with the visudo command. The sudo command is used as a prefix to the command to be executed as root, as follows:

packt@PacktPublishing:~$ sudo whoami
[sudo] password for packt:
root

It should be noted that while sudo is very often used to execute commands as root, it can also be used to have any user execute any command as any user.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required