| 1 | --- |
| 2 | title: SU(1) sudo-rs 0.2.14 | sudo-rs |
| 3 | --- |
| 4 | |
| 5 | # NAME |
| 6 | |
| 7 | `su` - run a shell or command as another user |
| 8 | |
| 9 | # SYNOPSIS |
| 10 | |
| 11 | `su` [options] [-] [<*user*> [<*argument*>...]] |
| 12 | |
| 13 | # OPTIONS |
| 14 | |
| 15 | `-c` *command*, `--command`=*command* |
| 16 | : Pass a single command to the shell with `-c`. |
| 17 | |
| 18 | `-g` *group*, `--group`=*group* |
| 19 | : Specify the primary group |
| 20 | |
| 21 | `-G` *group*, `--supp-group`=*group* |
| 22 | : Specify a supplemental group |
| 23 | |
| 24 | `-h`, `--help` |
| 25 | : Show a help message. |
| 26 | |
| 27 | `-`, `-l`, `--login` |
| 28 | : Make the shell a login shell |
| 29 | |
| 30 | `-m`, `-p`, `--preserve-environment` |
| 31 | : Do not reset environment variables |
| 32 | |
| 33 | `-P`, `--pty` |
| 34 | : Ignored for backwards compatibility. This version of su always creates |
| 35 | a new pseudo-terminal if it is attached to a TTY |
| 36 | |
| 37 | `-w` *list*, `--whitelist-environment`=*list* |
| 38 | : Do not reset the environment variables specified by the *list*. Multiple |
| 39 | variables can be separated by commas |
| 40 | |
| 41 | `-s` *shell*, `--shell`=*shell* |
| 42 | : Run *shell* if `/etc/shells` allows running as that shell instead of the |
| 43 | default shell for the user |
| 44 | |
| 45 | `-V`, `--version` |
| 46 | : Show the program version |
| 47 | |
| 48 | # SEE ALSO |
| 49 | |
| 50 | [sudo(8)](sudo.8.md) |