- サービスの起動/停止/再起動
systemctl start <service-name> ※起動
systemctl stop <service-name> ※停止
systemctl restart <service-name> ※再起動
systemctl reload <service-name> ※サービスの設定を再読み込み
- Unitの状態を確認
systemctl list-dependencies ※Unitの依存関係を表示
systemctl list-units ※起動している全てのUnitの状態を表示
systemctl list-unit-files ※全てのUnitを表示
systemctl list-unit-files -t service ※サービスの一覧を表示
systemctl list-unit-files -t service --state=enabled ※サービスの一覧を表示(自動起動が有効のみ)
- Unitのマスク(手動でも起動できないようにする)
systemctl mask <service-name> ※マスク有効
systemctl unmask <service-name> ※マスク解除
- システムの操作
systemctl poweroff ※システムを停止
systemctl reboot ※システムを再起動
- Unitファイルを再読み込み ※Unitファイルを追加・変更したら毎回行う
systemctl daemon-reload