RHEL7 systemd Control Service and Daemon

Source: Internet
Author: User

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.

    1. 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

    1. 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

    1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.