-
What are daemons?
Processes that either wait or run in the background, performing various tasks.
-
When do daemons start?
Usually at boot time and continue to run until they are manually stopped
-
What is the naming convention for names for many daemons programs to end with?
The letter d.
-
What does a service in the system sense often refer to?
One or more daemons.
-
Oneshot
When you leave a daemon process running after changing the state of another.
-
What is the first process that starts PID1?
systemd
-
What does systemd provide?
- Parallelization capabilities (starting multiple services simultaneously), which increase the boot speed of a system.
- • On-demand starting of daemons without requiring a separate service.
- • Automatic service dependency management, which can prevent long timeouts. For example, a network-dependent service will not attempt to start up until the network is available.
- • A method of tracking related processes together by using Linux control groups.
-
What does systemd use to manage objects?
Units
-
What units are .service?
.service extension and represent system services. This type of unit is used to start frequently accessed daemons, such as a web server.
-
What are .socket?
.socket extension and represent inter-process communication (IPC) sockets that systemd should monitor. If a client connects to the socket, systemd will start a daemon and pass the connection to it. Socket units are used to delay the start of a service at boot time and to start less frequently used services on demand.
-
What is a .path service unit?
are used to delay the activation of a service until a specific file system change occurs. This is commonly used for services which use spool directories such as a printing system.
-
Which command is used to manage service units?
systemctl
-
How do you see the available service types from the terminal?
systemctl -t help
-
Columns in the systemctl list-units command output?
- Unit - The service unit name
- Load - Whether systemd properly parsed the unit's configuration and loaded the unit into memory
- Active - The high-level activation state of the unit. This information indicates whether the unit has started successfully or not.
- Sub - The low-level activation state of the unit. This information indicates more detailed information about the unit. The information varies based on unit type, state, and how the unit is executed.
- Description - The short description of the unit.
-
What does systemctl list-units display?
The systemctl list-units command displays units that the systemd service attempts to parse and load into memory; it does not display installed, but not enabled, services.
-
How do you view a specific unit?
systemctl status name.type
-
How do you view the state of all unit files installed?
systemctl list-unit-files
-
How do you verify that a service is active?
systemctl status is-active sshd.service
-
How do you verify that a service is enabled?
systemctl status is-enabled sshd.service
-
How do you verify that a service failed during startup?
systemctl is-failed sshd
-
How do you list all failed units?
systemctl --failed
-
Who starts services as needed?
systemd or systemctl
-
What does masking a service do?
Masking a service prevents an administrator from accidentally starting a service that conflicts with others.
-
What is created when you mask a service?
A link in the configuration files to /dev/null preventing the service from starting.
-
What does systemd do to enable and disable services at boot?
It creates links to prevent the services from starting at boot. systemctl removes them.
systemctl start sshd.service
-
Does enabling a service start the service?
No. The service will only start at reboot. You must use systemctl start sshd.service
-
How do you prevent a service from starting at boot?
systemctl disable sshd.service
-
What does systemctl list-dependencies UNIT do?
List units required and wanted by the specified unit.
systemctl list-dependencies sshd.service
|
|