1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 14:02:08 +02:00
tldr/pages/common/su.md
2022-01-25 12:50:37 -03:00

20 lines
375 B
Markdown

# su
> Switch shell to another user.
> More information: <https://manned.org/su>.
- Switch to superuser (requires the root password):
`su`
- Switch to a given user (requires the user's password):
`su {{username}}`
- Switch to a given user and simulate a full login shell:
`su - {{username}}`
- Execute a command as another user:
`su - {{username}} -c "{{command}}"`