1, Systemctl is Rhel 7 of the service management tools of the main tool, it blends the former service and Chkconfig functions in one. You can use it to enable/disable services either permanently or only in the current session.
Systemctl can list the running service status, as shown in figure:
Systemd-cgls lists the running processes in a tree, which can recursively display control group content. As shown in figure:
2. How do I start/close, enable/disable services?
Start a service: Systemctl start Postfix.service
Turn off a service: Systemctl stop Postfix.service
Restart a service: Systemctl restart Postfix.service
Displays the status of a service: Systemctl status Postfix.service
Enable a service on power-on: Systemctl enable Postfix.service
Disable a service on power-on: Systemctl disable Postfix.service
To see if the service starts: Systemctl is-enabled postfix.service
To view a list of services started: Systemctl List-unit-files|grep enabled
To view a list of services that failed to start: Systemctl--failed
PS: The value obtained by using the command Systemctl is-enabled Postfix.service can be enable, disable, or static, where static it means that there is no definition in the corresponding unit file [ Install] area, so it cannot be configured to boot service.
Description: Enabling services is in the current "runlevel" configuration file directory/etc/systemd/system/multi-user.target.wants/, the establishment of/usr/lib/systemd/ System inside the corresponding service profile soft link; Disabling services is removing this soft link and adding a service is adding a soft connection. As shown in figure:
The above article discusses the usage of SYSTEMCTL in Rhel 7 (substitute service and chkconfig) is a small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.