Systemd
for Linux , Systemd is an init program that can be used as an alternative to sysvinit and upstat .
The Primary command for monitoring and controlling systemd is SYSTEMCD, which can be used to view system status and manage systems and services.
working with cells: a unit configuration file can describe one of the following: System service (. Service), Mount Store (. Mount),sockets(. Sockets, System device, swap partition, file, start target, file system path, use the full name of the unit file, including the extension (such as:sshd. service) some can be abbreviated.
List cells
The Systemctl command can be taken with list-units or any of the running units without listing any options.
[Email protected]_lyb Desktop ]# systemctl list-units
The list of failed units can be displayed with the-failed option command.
[Email protected]_lyb Desktop ]# systemctl--failed
Management Services
1) View the active service
[[Email protected]_lyb Desktop ]# systemctl list-units-t Service
2) Service status (sshd.service service status)
[Email protected]_lyb Desktop ]# systemctl status Sshd.service
3) start a service (start sshd.service)
[Email protected]_lyb Desktop ]# systemctl start Sshd.service
4) Stop a service (stop sshd.service)
[[Email protected]_lyb Desktop ]# systemctl stop Sshd.service
5) restart a service ( restart Sshd.service)
[Email protected]_lyb Desktop ]# systemctl restart Sshd.service
6) Reload a service
When we need to reload the service's configuration file and do not want to restart the service (such as ssh):
[Email protected]_lyb Desktop ]# systemctl Reload Sshd.service
Manage the service at boot time
Chkconfig command is to manage the service when booting the system, that is, whether the boot is open by default, the same systemd can also be used to manage the boot system services.
1) Check whether the service is running at boot time (such as sshd. service)
[Email protected]_lyb Desktop ]# systemctl is-enabled sshd.service
2) Let the service run at boot time
[[Email protected]_lyb Desktop ]# systemctl enable Sshd.service
3) Cancel service runs at boot time
[Email protected]_lyb Desktop ]# systemctl disable Sshd.service
This article is from the "Luck.lyb" blog, make sure to keep this source http://51lyb.blog.51cto.com/9578351/1575477
RHEL7 systemd Control Service and Daemon