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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store