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

323 B

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