terminal.cab

All commands

su

Topic: Permissions and ownership

Program: su

Switches to another user.

Package: sudo

Usage

su [-] [-l] [-c COMMAND] [USER]

Description

Become USER (root if USER is missing) after typing USER's password: a shell as USER, or only COMMAND with -c.

Options in the simulator

13 more options of the real program, not in the simulator yet
  • -m, --preserve-environment not in the simulator yet

    The simulator cannot do this su option.

  • -p not in the simulator yet

    The simulator cannot do this su option.

  • -w, --whitelist-environment needs a value not in the simulator yet

    The simulator cannot do this su option.

  • -g, --group needs a value not in the simulator yet

    The simulator cannot do this su option.

  • -G, --supp-group needs a value not in the simulator yet

    The simulator cannot do this su option.

  • -l, --login not in the simulator yet

    Explanation to come

  • -c, --command needs a value not in the simulator yet

    Explanation to come

  • --session-command needs a value not in the simulator yet

    The simulator cannot do this su option.

  • -f, --fast not in the simulator yet

    The simulator cannot do this su option.

  • -s, --shell needs a value not in the simulator yet

    su -s starts a different shell; the simulator only has bash.

  • -P, --pty not in the simulator yet

    The simulator cannot do this su option.

  • -T, --no-pty not in the simulator yet

    The simulator cannot do this su option.

  • -V, --version not in the simulator yet

    Explanation to come

Examples

From the lesson Root for a moment
sudo -i
id -un
root
exit
logout
su -
Password: 
su: Authentication failure

Try it in the terminal

Where you learn it

Lessons

All commands