1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/sudo.md
Martin Pool fe37d4fb83 sudo: use shutdown -h to halt rather than reboot (#1191)
Makes the example consistent with its description
2016-12-06 13:39:45 +00:00

19 lines
323 B
Markdown

# sudo
> Execute a command as another user.
- List 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}} -h +10 {{"Cya soon!"}}`
- To repeat the last command as sudo:
`sudo {{!!}}`