docs: update sudo command article
This commit is contained in:
@@ -15,6 +15,7 @@ sudo [-u <user>] [-s | -i] [<command> [<arg>...]]
|
||||
## 使用例
|
||||
|
||||
### システム用ディレクトリにファイルを作成する
|
||||
前提:
|
||||
- `/opt`,`/etc`,`/var`などのシステム用ディレクトリは通常rootが所有
|
||||
- 一般ユーザがそのようなディレクトリにファイルを作成する際には`sudo`を使用
|
||||
- 書き込み権限があれば`sudo`は不要
|
||||
@@ -24,6 +25,7 @@ sudo mkdir /opt/gitea
|
||||
```
|
||||
|
||||
### postgresユーザとしてpsqlを実行する
|
||||
前提:
|
||||
- PostgreSQLをインストールすると、`postgres`という専用ユーザが作成される
|
||||
- PostgreSQLでは、ローカル接続時にpeer認証が使用される
|
||||
- `postgres`ユーザとして実行することで、DBの管理者ロールである`postgres`に接続できる
|
||||
|
||||
Reference in New Issue
Block a user