systemctl
systemd用のCLI
サービスを開始する
$ sudo systemctl start postfix.service
サービスを停止する
$ sudo systemctl stop postfix.service
サービスを再起動する
$ sudo systemctl restart postfix.service
ユニットタイプがserviceであるものを表示する
$ sudo systemctl list-unit-files -t service
ユニットタイプがserviceかつ、stateがenableであるものを表示する
$ sudo systemctl list-unit-files -t service --state=enabled
*.serviceや*.timerなどのUnitファイルの変更を反映するためのコマンド。
$ sudo systemctl daemon-reload
設定のリロードと、再実行まで含めてやるらしいコマンド。主にデバッグ、パッケージアップグレード時に用いる
$ sudo systemctl daemon-reexec
システム起動時のデフォルト設定を調べる
$ sudo systemctl get-default
参考
systemctl(1) — Arch Linux マニュアルページ
【チートシート】systemctlコマンド使い方まとめ
メモ
systemctl restart と daemon-reload の違いとは?
https://note.com/minato_kame/n/n6f172497fe4f
#shell #systemd