service と systemctl - Linux

service と systemctl の違い

CentOS 6.x までは、サービスの起動/停止が service コマンドを使用。このコマンドの実態はシェルスクリプトで 「 /etc/init.d/ 」 内のスクリプトを実行している。

CentOS 7.x からは systemctlコマンド に切り替わり chkconfig と service で設定していたことが systemctl コマンドのみで設定可能。

systemctl は標準で enable コマンドが使えるため、systemctl コマンドを利用するほうが簡単に設定ができる。