소스 검색

create sudo.md

initial
Michal 5 년 전
부모
커밋
f1623f42ee
1개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 23 0
      pages.pl/common/sudo.md

+ 23 - 0
pages.pl/common/sudo.md

@@ -0,0 +1,23 @@
+# sudo
+
+> Executes a single command as the superuser or another user.
+
+- Run a command as the superuser:
+
+`sudo {{less /var/log/syslog}}`
+
+- Edit a file as the superuser with your default editor:
+
+`sudo -e {{/etc/fstab}}`
+
+- Run a command as another user and/or group:
+
+`sudo -u {{user}} -g {{group}} {{id -a}}`
+
+- Repeat the last command prefixed with "sudo" (only in bash, zsh, etc.):
+
+`sudo !!`
+
+- Launch the default shell with superuser privileges:
+
+`sudo -i`