揮発性のメモ2

http://d.hatena.ne.jp/iww/

systemctl よく使うオプション

systemctl --no-pager ページャーを使用しない
systemctl list-units -t service サービス一覧
今アクティブなやつ
systemctl list-unit-files -t service サービス一覧全部
非アクティブも含む
systemctl daemon-reload ユニットファイル等の再読み込み
systemctl enable hoge hogeの有効化(自動起動開始)
systemctl disable hoge hogeの無効化(自動起動停止)
systemctl status hoge hogeの状態を表示
systemctl start hoge hogeの開始
systemctl stop hoge hogeの停止
systemctl restart hoge hogeの停止、再開
systemctl reload hoge hogeのリロード処理(あれば)

hogeは複数いっぺんに書くことができる。


パッケージ内に /etc/init.d/hoge が存在する場合、systemctl enable hoge 時についでに /usr/sbin/update-rc.d が実行される。(パッケージの後方互換のため)