CentOS7 の一般的なコマンド#
システムコマンド#
-
実行レベルの確認:
runlevel
実行レベルに関する知識点:
0:シャットダウン 1:シングルユーザーテキストモード(パスワードリカバリ) 2: 3:マルチユーザーテキストモード 4: 5:マルチユーザーグラフィカルモード 6:再起動
-
実行レベルの切り替え:
init
-
画面クリアコマンド:
clear
ネットワークコマンド#
-
ローカル IP の表示:
ip addr
-
ネットワーク接続のテスト:
ping
サービスコマンド#
systemctl
:サービスの管理
systemctl サービス名 status
:サービスの状態を表示
systemctl サービス名 stop
:サービスを停止
systemctl サービス名 start
:サービスを開始
systemctl サービス名 restart
:サービスを再起動
systemctl サービス名 enable
:サービスの自動起動
systemctl サービス名 disable
:サービスの自動起動を無効化
getenforce
:selinux の状態を確認
setenforce
:selinux の状態を設定
その他のコマンド#
echo
:メッセージの表示
tar -z