Slides on how to control services and daemons - Part of RHCSA (RH124) syllabus
Size: 421.68 KB
Language: en
Added: Oct 16, 2024
Slides: 11 pages
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>