Linux

su

CautionSwitch user

su - <user>

Switches user. The dash also loads the target's environment (recommended). Classic way to become root.

Examples

  • su -Full switch to root

Syntax

su [-] [user]

Before you run it

Mistakes as root can be fatal.

Related commands

  • sudoRun as superuser
  • idShow UID/GID and groups

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store