0% found this document useful (0 votes)
23 views

07 Control Services and Daemons

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

07 Control Services and Daemons

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Control Services and

Daemons
Managing services and daemons
Services and daemons run in the background and are managed by the init system
with systemd

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
Init system

● First process that starts when a system boots up


● Handles starting and stopping services during the boot and shutdown
processes

systemd
● 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>

You might also like