First, RHEL6 and RHEL7 service control methods are different
RHEL6 in use: Service XXX start|stop|restart|reload
Used in RHEL7: Systemctl start|stop|restart|reload XXXX
Second, view system services
To view the suffix in the system for service services:
[Email protected] ~]# Systemctl list-unit-files--type=service
The service set with the suffix target, which contains the service suffix, is understood as the RunLevel in RHEL6:
[Email protected] ~]# Systemctl list-unit-files--type=target
RHEL6 the operating level inside, the RunLevel includes services that specify whether the service starts and starts the sequence:
0 1 2 3 4 5 6
Shutdown single user multi-user not using graphical interface restart
To view the operating level of the RHEL7:
[[email protected] ~]# RunLevel N 5
The target for RHEL7 is the service set, which includes services that are suffixed with service:
A.target:a.service,b.service,c.service,d.service
B.target:a.service,b.serice,c.service,d.serice
View and set RHEL7 default run target:
[Email protected] ~]# Systemctl get-default graphical.target
[Email protected] ~]# Systemctl set-default multi-user.target
The target in RHEL7 is compared to the operating level of RHEL6:
RHEL6 RHEL7
0 Runlevel0 Poweroff.target
1 Runlevel1 Rescuse.target
2 Runlevel2 Multi-user.target
3 Runlevel3 Multi-user.target
4 Runlevel4 Multi-user.target
5 Runlevel5 Graphical.target
6 Runlevel6 Reboot.target
To switch the run level:
[Email protected] ~]# Systemctl isolate Graphical.target
Emergency.target Graphical.target Multi-user.target Rescue.target
In RHEL7, you can allow multiple terminals to open a graphical interface, while only 1 graphical interfaces are allowed to run in RHEL6.
This article is from the "Ordinary Road" blog, please be sure to keep this source http://linjohn.blog.51cto.com/1026193/1611000
RHCE7 Learning Notes 28--control services and processes