su

Linux · Users and permissions · available in the simulator

What it does

Switches to another user (substitute user).

Options and parameters

  • -

    starts the shell as a login shell with an environment similar to a real login

  • -c CMD

    passes a single command to the shell and returns

Usage examples

  • su
  • su root
  • su - ana
  • su - usuario
  • su -c 'id' usuario
Practise su

Related commands