Su

su — the substitute user command. su can be used to impersonate other users on the system. It is included with the GNU's package.

Usage
The su command will run commands as root by default. Since not specifying a username will cause su to ask for root privileges, the following command will run as root and halt the system:

{{Note|It is best practice to encapsulate the commands following the  option with either single or double quotes.

It is also possible to specify a user other than root to substitute commands. The following example will run the command echo command from a user account called larry: {{Cmd|su -c 'echo "Moo to the Gentoo wiki reader out there!"' larry}}