よく使うコマンド
| su | ルートユーザーに切り替え |
| su (username) | 指定ユーザーに切り替え |
| exit | エミュレータの終了 |
| pwd | 現ディレクトリのフルパス表示 |
| cd (dir) | ディレクトリへ移動(dir省略でホームへ移動) |
| rm -r (dir) | 指定ディレクトリをファイルごと削除 |
| cp -r (dirA) (dirB) | dirAをdirBにコピー |
| mv (file) (dir) | ファイルをdirへ移動 |
| ls | 現ディレクトリにあるファイルを表示 |
| ls (dir) | 指定ディレクトリにあるファイルを表示 |
| ls -a | 隠しファイルを含めて表示 |
ファイル操作
| cat (file) | ファイルの内容を表示 |
| rm (file) | ファイルの削除 |
| cp (fileA) (fileB) | fileAをfileBにコピー |
| mv (fileA) (fileB) | fileAの名前をfileBに変更 |
検索
| find (dir) | dir以下のファイルを列挙 |
| find -name (char) | charに一致するfile・dirを検索 |
| locate (char) | cahrを含むfile・dirを列挙 |
システム
| shutdown | シャットダウン |
| shutdown -r | シャットダウンして再起動 |
| reboot | 再起動 |
| groups | 所属グループの表示 |
| chown (user) (file) | fileの所有者をuserに変更 |
| chgrp (group) (file) | fileの所有グループをuserに変更 |
| useradd (user) | userの追加 |
| userdel (user) | userの削除 |
| groupadd (group) | groupの追加 |
| groupdel (group) | groupの削除 |
| passwd (user) | userのパスワードの設定 |
| who | 現在ログインしているユーザーを表示 |
サーバーの記事
HOME