mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-08 04:57:24 +00:00
Update cheatsheets
This commit is contained in:
25
su
Normal file
25
su
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}"`
|
||||
Reference in New Issue
Block a user