Control Services and Daemons - RHCSA (RH124).pdf

support8872 618 views 11 slides Oct 16, 2024
Slide 1
Slide 1 of 11
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11

About This Presentation

Slides on how to control services and daemons - Part of RHCSA (RH124) syllabus


Slide Content

Control Services and
Daemons

Services
●OS components that manage daemons, allowing control over their current
state (start, stop, or restart)


Daemons
●Background processes that start automatically at boot and run
continuously until stopped or the system shuts down
Managing services and daemons
Services and daemons run in the background and are managed by the init system
with systemd

Init system
systemd
●First process that starts when a system boots up
●Handles starting and stopping services during the boot and shutdown
processes
●Most common init system in modern Linux distributions, designed to
manage services and daemons more efficiently
●Parent process of most of the daemons

To verify systemd is installed in system
●Command: systemctl --version
To check all the available services running in the system
●Command: systemctl list-units --type=service

To list all the services and daemons including the inactive ones
●Command: systemctl --all
Check the status of specific service
●Command: systemctl status <service-name>

To stop a particular service
●Command: systemctl stop <service-name>
To start a particular service
●Command: systemctl start sshd.service

For restarting a particular service
●Command: systemctl restart <service-name>
To reload a particular service
●Command: systemctl reload <service-name>

To enable a particular service
●Command: systemctl enable <service-name>
To verify if a service is enabled or not
●Command: systemctl is-enabled <service-name>

For disabling a particular service
●Command: systemctl disable <service-name>
Masking a particular service
●Command: systemctl mask <service-name>
Note: Masking a service means preventing it from being started, either
manually or automatically, until it is unmasked

To unmask a service
●Command: systemctl unmask <service-name>