Permissions and Ownership

su

Switches user or starts a shell as another user.

su starts a shell as another user, commonly root, after authentication.

Syntax
su [options] [user]

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Switch to root login shell
su -

Starts a root login shell if root login is enabled.

Run as another user
su - appuser

Starts a login shell as appuser.

su Command
FieldDetails
Commandsu
CategoryPermissions and Ownership
Primary useSwitches user or starts a shell as another user.
Syntaxsu [options] [user]