mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-15 04:50:40 +03:00
Adding docs for 'sudo'
This commit is contained in:
parent
ad628263aa
commit
c21f4de00e
23
pages/common/sudo.md
Normal file
23
pages/common/sudo.md
Normal file
@ -0,0 +1,23 @@
|
||||
# sudo
|
||||
|
||||
> execute a command as another user
|
||||
|
||||
- Listing of an unreadable directory:
|
||||
|
||||
`sudo ls /usr/local/scrt`
|
||||
|
||||
- To list the home directory of non-root user
|
||||
|
||||
`sudo -u Jhon ls ~Jhon`
|
||||
|
||||
- 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…
Reference in New Issue
Block a user