RHCE7 Learning Notes 6--control services and background processes

Source: Internet
Author: User

1. Control Service (services and Daemons)

RHEL7 Previous version Control services use service XX Start|stop|status:

[[Email protected] ~]# service sshd status

The RHEL7 Control service uses SYSTEMCTL Start|stop|status|restart XX service to view the current running status of the service using is-active:

[Email protected] ~]# systemctl status sshd
[Email protected] ~]# Systemctl is-active sshdactive
[Email protected] ~]# Systemctl sart|stop|restart sshd

See if a service will boot automatically start using is-enable, which corresponds to disable:

[Email protected] ~]# Systemctl is-enabled sshdenabled

Disable a service using mask, which corresponds to unmask:

The following summarizes the options for the SYSTEMCTL Command common Control Service:

  start [name ...]                  start   (Activate)  one or more units  start service   stop [name ...]                    stop  (deactivate)  one or more units  stop service   reload [name ...]                 Reload  one or more units  Reload   restart [name ...]                Start or  restart one or more units  Restart   kill [name ...]                    Send signal to processes of a unit  Kill Process   is-active [name ...]              check whether units  are active  whether to start   is-failed [name ...]              check whether units Whether  are failed  fails   status [name...| PID ...]          show runtime status of one or  more units  status
  enable [name ...]                 Enable  one or more unit files  boot   disable [name ...]                disable one  or more unit files  boot does not start   reenable [name ...]               reenable one or  more unit files  Reset Boot 
is-enabled [NAME ...]                  Check whether unit files is enabled to boot mask [NAME ...]                Mask One or more units disable service unmask [NAME ...] Unmask One or more units service


View all services for the system: Systemctl List-units-all or System ctl list-units-files:

[Email protected] ~]# Systemctl list-units
[Email protected] ~]# Systemctl list-unit-files

Add the type option to view all services:

[Email protected] ~]# systemctl list-unit-files--type serviceunit FILE State ABRT-CC                     Pp.service enabled Abrt-oops.service enabled Abrt-pstoreoops.service Disabled


This article is from the "Ordinary Road" blog, please be sure to keep this source http://linjohn.blog.51cto.com/1026193/1599225

RHCE7 Learning Notes 6--control services and background processes

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.