よく使っているコマンドの備忘録です
●共通
ディレクトリ作成 mk ディレクトリ名
ファイル作成 touch ファイル名
パーミッション chmod 権限 ファイル名
(例) chmod 644 test.html test.htmlは、所有者は読み書き可能だが、他は読込だけ
所有者(+root) | r(読込) w(書込) x(実行) | 4+2+1 |
グループメンバ | r w x | 4+2+1 |
その他のメンバ | r w x | 4+2+1 |
● ネットワーク関係
ローカルIPの確認 hostname -I
ポートの状態確認 (TCP)ss -ant (UDP) ss -anu
● バージョン管理
コアカーネルのバージョン確認 cat /etc/issue
バージョンアップ sudo apt update
● Apache関係
再起動 sudo service apache2 restart
起動 sudo service apache2 start
停止 sudo service apache2 stop
errorログの表示 tail -f /var/log/apache2/error.log
バージョン確認 apache2 -v
● php関係
バージョン確認 php -v
composer バージョン確認 composer -v
composerプロジェクトの生成 composer init