Systemctl Services in RHEL 7
Systemd is a system and service manager for Linux operating systems. It is designed to be backwards compatible with SysV init scripts, and provides a number of features such as parallel startup of system services at boot time, on-demand activation of daemons, support for system state snapshots, or dependency-based service control logic. In Red Hat Enterprise Linux 7, systemd replaces Upstart as the default init system.
1) To Start a Service:
2) To Stop a Service:
3) To Restart a Service:
4) To check for the Status :
5) To Restart the Service only if it is running:
NOTE: The System service doesn’t support this feature. For convenience, the systemctl command also supports the reload-to-restart and reload-to-try-restart commands that restarts such services instead.
6) To Check if the Service is active or in-active:
7) To Display the status of all Services:
8) To Enable the Service:
8.1) To re-create the symbolic-links while re-enabling the service unit.
9) To Disable a Service:
9.1) To prevent the service being started manually or by any other service, you can make use of the mask
9.2) To Revert this option and unmask the service unit:
10) To List all Services and check if they are enabled:
11) To List Services that are ordered to start before the specified unit.
12) To List Services that are odered to to start after the specified unit.
13) To List all currently loaded Service Units.
14) By default the systemctl list-units will display only the active units. If you want to list all the loaded untis regardless of their state.
15) To List all the Available Service Units :