📜

cmd cheet sheet

に公開

Process

ps aux #システム上で実行中のすべてのプロセスに関する情報を表示
ps aux | tail -n+2 | wc -l
ps aux | grep apache2 # 

top # process realtime info
df -h  # ディスク使用量
which nano # 指定したコマンドのパス
which vi
less /etc/apache2/sites-enabled/000-default.conf

sudo systemctl status apache2
sudo systemctl restart apache2
sudo systemctl reload apache2
sudo systemctl stop apache2
sudo systemctl enable apache2
sudo systemctl disable apache2



Vim

:wq # save and quit
i # insert
esc # insert escape


https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-image-store.s3.amazonaws.com%2F0%2F80608%2Fd6ab3c97-999a-7acb-7447-9b65b838ceb6.jpeg?ixlib=rb-4.0.0&auto=format&gif-q=60&q=75&s=3c7167126503db2f5c5de3430845fa21

Terminal

tail # 末尾n行を表示
head
cat

top # メモリ使用状況
df -h # ディスク使用状況
ps aux | tail -n+2 | wc -l  # プロセス起動数

Discussion