Explorar o código

Adding docs for 'sudo'

hemanth.hm %!s(int64=10) %!d(string=hai) anos
pai
achega
c21f4de00e
Modificáronse 1 ficheiros con 23 adicións e 0 borrados
  1. 23 0
      pages/common/sudo.md

+ 23 - 0
pages/common/sudo.md

@@ -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 !!`