su: Document the [-c command] option

This commit is contained in:
Karol Baraniecki 2023-02-12 18:45:56 +01:00 committed by Sam Atkins
parent 040012a196
commit 7fc7d4f8c6
Notes: sideshowbarker 2024-07-17 05:01:20 +09:00

View File

@ -6,6 +6,7 @@ su - switch to another user
```sh
$ su [-] [user]
$ su [-] [user] [-c command]
```
## Description
@ -18,6 +19,8 @@ When called with no user-specified, `su` defaults to switch to the *root* user.
* `-`, `-l`, `--login`: Start the shell as it was a real login
* `-c`, `--command`: Execute a command using `/bin/sh` instead of starting an interactive shell
## Arguments
* `user`: User to switch to (defaults to the user with UID 0)