LoginSignup
50
61

More than 3 years have passed since last update.

よく使うsystemctlコマンドまとめ

Last updated at Posted at 2019-04-04

基本的なsystemctlコマンド

よく使うコマンドをまとめました。

systemctlはsystemdを操作するコマンドで、サービスの起動や停止、状態確認などを行うことが出来ます。

書き方

# systemctl コマンド {ユニット名}.service

末尾の.serviceは省略できます。
※一般ユーザで起動、停止などを行う場合はsudoが必要です。

コマンド

・サービスのステータス確認

# systemctl status {ユニット名}

・サービスの起動

# systemctl start {ユニット名}

・サービスの再起動

# systemctl restart {ユニット名}

・サービスの停止

# systemctl stop {ユニット名}

・サービス自動起動を有効にする

# systemctl enable {ユニット名}

・サービス自動起動を無効にする

# systemctl disable {ユニット名}
50
61
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
50
61