Deletions are marked like this. | Additions are marked like this. |
Line 27: | Line 27: |
単一のサービスについて確認するには以下。 {{{ systemctl is-enabled サービス名.service }}} |
|
Line 38: | Line 32: |
== 現在の状態 == | == 現在のサービスの状態表示 == |
Line 43: | Line 37: |
== サービスの起動と停止 == * systemctl start dhcpd.service * systemctl stop dhcpd.service |
centos7
emacsでsystemctlコマンドを使用すると警告が出る
WARNING: terminal is not fully functional - (press RETURN)
この場合
export PAGER=/bin/cat
とする。
systemctlのまとめ
サービスの一覧と状態のリスト
systemctl list-unit-files -t service
enable: 自動起動、disable:起動不可、static:単体では自動起動できない。
自動起動の設定
- systemctl enable サービス名.service
- systemctl disable サービス名.service
現在のサービスの状態表示
systemctl status サービス名.service
サービスの起動と停止
- systemctl start dhcpd.service
- systemctl stop dhcpd.service