mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-12 18:55:49 +02:00
commit
c1a409e8c1
1 changed files with 20 additions and 0 deletions
20
pages/common/sudo.md
Normal file
20
pages/common/sudo.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# sudo
|
||||
|
||||
> execute a command as another user
|
||||
|
||||
- Listing of an unreadable directory:
|
||||
|
||||
`sudo {{ls}} {{/usr/local/scrt}}`
|
||||
|
||||
|
||||
- To edit a file as user www:
|
||||
|
||||
`sudo -u {{www}} {{vi}} {{/var/www/index.html}}`
|
||||
|
||||
- To shutdown the machine:
|
||||
|
||||
`sudo {{shutdown}} -r +10 {{"Cya soon!"}}`
|
||||
|
||||
- To repeat the last command as sudo
|
||||
|
||||
`sudo {{!!}}`
|
Loading…
Add table
Reference in a new issue