centos7 of systemctl

systemctl   ==> service + chkconfig

  systemctl scan list: original /etc/init.d, then 7: / usr / lib / systemd / system

Start a service:
systemctl Start postfix.service

Close a service:
systemctl STOP postfix.service

Restart a service:
systemctl restart postfix.service


Status display of a service:
systemctl Status postfix.service


Enable a service at boot:
systemctl enable postfix.service

At boot disable a service:
systemctl disable postfix.service


See if service startup:
systemctl IS-Enabled postfix.service


View your active list of services:
systemctl List-Unit-Files | grep Enabled


View a list of services failed to start:
systemctl --failed

 

Use command value systemctl is-enabled postfix.service obtained may enable, disable, or static, static here it refers to the corresponding file is not defined Unit [Install] region, the service can not be configured to boot.

 

Service is enabled in the current "runlevel" profile directory /etc/systemd/system/multi-user.target.wants in softlinks the corresponding service configuration file / usr / lib / systemd / system inside;

Disabling this service is to remove soft links, add the service is to add a soft link.

 

Guess you like

Origin www.cnblogs.com/veryvalley/p/11131758.html