Systemd

systemd is an amalgamation of init processes and service managers.

First and foremost, it is the server daemon systemd(1). It is also the userland interfaces systemctl(1) and journalctl(1).

The systemd project also encompasses systemd-networkd, systemd-resolved, systemd-timerd, systemd-logind, systemd-homed, systemd-firewalld, among a few others.


Usage

A service is configured with a unit file. A unit file's functionality is hinted by its file extension:

Operating system unit files are located in /usr/lib/systemd and symlinked to /etc/systemd to enable them. User process unit files are located in $HOME/.config/systemd/user and symlinked to /etc/systemd/user to enable them.

Overwriting Unit Files

To overwrite a unit file, try:

systemctl edit --full foo

Alternatively but not recommended: to overwrite /usr/lib/systemd/system/foo, create an editted copy at /etc/systemd/system/foo.

In either case, reloading the service will cause the new configuration to be used.

Editing Unit Files

A drop-in file is a partial unit file that is patched over the primary unit file at load time.

To create a drop-in file, try:

systemctl edit foo

Alternatively but not recommended: to edit /usr/lib/systemd/system/foo, create the directory /etc/systemd/system/foo.d/ and place .conf files within it.

To revert edits to a unit file, try:

systemctl revert foo


Configuration

If a unit file takes too long to start at boot, systemd(1) switches to verbose mode and prints information that may help in diagnosing issues. This setting can be explicitly disabled in /etc/systemd/system.conf.

[Manager]
ShowStatus=no


See also

systemd(1)


CategoryRicottone

Linux/Systemd (last edited 2023-04-06 15:35:56 by DominicRicottone)