In this article, you will learn about what is the systemd in Linux?
In CentOS/RHEL 7/8, there is a new
systemd introduced to manage the services and the system. The
systemd is the
first process that starts after the system boots, and it is the
final process that is running when the system shuts down.
Systemd is designed to have backward compatibility with
SysV that is
init scripts. Maximum it supports backward compatibility.
Features of systemd
It has many different features, some of them you can find as follows.
Parallel start. It means multiple services can be started once. This feature makes the booting process faster.
- It supports the
on-demandactivation of the daemon.
- The systemd supports the
system state snapshot.
- It also supports the
dependency-based service control logic.
The systemd configuration files location
You can find the below information useful to get the location of systemd configuration files. These are essential details and must be aware of it.
The unit configuration files are located
The run time created directory located
The files can be created and managed by the system administrator are located
Getting an overview of the system state
You can use the systemd to pull the information of the system state, and it will tell you the active service status. So, use the below command for it.
Also, you can see all the
active services status using the below command.
systemctl list-units --all
If you want to list all of the units installed on the system, including those that systemd has not tried to load into memory so you can use the following command.
Viewing basic log information
A systemd component called
journald collects and manages journal entries from all parts of the system. It gets this logs information from applications and the kernel. Also, you can use the below command to get the general logs.
These logs do not stay after system boot. If you want to make it persistent then you have to create a directory. Use the below command to create it.
sudo mkdir -p /var/log/journal
You can get the arguments for
journalctl using the below command.
In this article, we learn about systemd in Linux. It is important in the latest Linux versions like CentOS 7 and 8 or Red Hat Enterprise Linux 7 and 8 and also in Fedora. I hope, you understand but if you have any questions, you can ask in the comment section.
Also, you further read,