1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 05:17:58 +01:00
tldr/pages/common/sudo.md
2016-01-08 09:38:59 +01:00

326 B

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 {{!!}}