summaryrefslogtreecommitdiff
path: root/Base/usr/share/man/man1/su.md
blob: ab290f78f96d6247b8b829507d02ea5340c65afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Name

su - switch to another user

## Synopsis

```sh
$ su [-] [user]
$ su [-] [user] [-c command]
```

## Description

`su`: Switch to another user.

When called with no user-specified, `su` defaults to switch to the *root* user. Need to enter the password if the user switch to has one.

## Options:

* `-`, `-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)

## Examples

Switch to root user

```sh
$ su
```

Switch to another user

```sh
$ su nona
```