提供:あわWiki
移動先: 案内検索

ヘルプ:systemdコマンド

メインページ > ヘルプ:目次 > ヘルプ:自宅サーバーの管理(CentOS)  > systemdコマンド

systemdでの自動起動設定方法

自動起動設定

[root@host3 ~]# systemctl enable サービス名

自動起動解除

[root@host3 ~]# systemctl disable サービス名

自動起動一覧表示

[root@host3 ~]# systemctl list-unit-files  -t service
UNIT FILE                                     STATE   
amavisd-clean-quarantine.service              static  
amavisd-clean-tmp.service                     static  
amavisd.service                               enabled 
arp-ethers.service                            disabled
auditd.service                                enabled 
autovt@.service                               enabled 
avahi-daemon.service                          enabled 
blk-availability.service                      disabled
brandbot.service                              static  
chrony-dnssrv@.service                        static  
・
・

chkconfig --listを実行

この出力は SysV サービスのみであり、ネイティブな systemd のサービスは含まれていません。
systemd services. SysV 設定のデータはネイティブな systemd の設定によって上書きされます。
systemd サービスを一覧表示するには 'systemctl list-unit-files' を使用してください。
特定のターゲットにおいて有効化されているサービスを確認するには、'systemctl list-dependencies [target]' 。

[root@host3 ~]# systemctl list-unit-files -t service