mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
create sudo.md
initial
This commit is contained in:
parent
1016732868
commit
f1623f42ee
1 changed files with 23 additions and 0 deletions
23
pages.pl/common/sudo.md
Normal file
23
pages.pl/common/sudo.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# sudo
|
||||||
|
|
||||||
|
> Executes a single command as the superuser or another user.
|
||||||
|
|
||||||
|
- Run a command as the superuser:
|
||||||
|
|
||||||
|
`sudo {{less /var/log/syslog}}`
|
||||||
|
|
||||||
|
- Edit a file as the superuser with your default editor:
|
||||||
|
|
||||||
|
`sudo -e {{/etc/fstab}}`
|
||||||
|
|
||||||
|
- Run a command as another user and/or group:
|
||||||
|
|
||||||
|
`sudo -u {{user}} -g {{group}} {{id -a}}`
|
||||||
|
|
||||||
|
- Repeat the last command prefixed with "sudo" (only in bash, zsh, etc.):
|
||||||
|
|
||||||
|
`sudo !!`
|
||||||
|
|
||||||
|
- Launch the default shell with superuser privileges:
|
||||||
|
|
||||||
|
`sudo -i`
|
Loading…
Add table
Reference in a new issue