Overview of Systemd

Systemd is a system and service manager for Linux operating systems. 
It provides a number of features such as parallel startup of system services at boot time, on-demand activation of daemons, support for system state snapshots, or dependency-based service control logic.

Systemd introduces the concept of systemd units. These units are represented by unit configuration files. Bellow is the list of available systemd unit types.



Unit TypeFile ExtensionDescription
Service unit.serviceA system service.
Target unit.targetA group of systemd units.
Automount unit.automountA file system automount point.
Device unit.deviceA device file recognized by the kernel.
Mount unit.mountA file system mount point.
Path unit.pathA file or directory in a file system.
Scope unit.scopeAn externally created process.
Slice unit.sliceA group of hierarchically organized units that manage system processes.
Snapshot unit.snapshotA saved state of the systemd manager.
Socket unit.socketAn inter-process communication socket.
Swap unit.swapA swap device or a swap file.
Timer unit.timerA systemd timer.
 Location of the systemd unit files

DirectoryDescription
/usr/lib/systemd/system/Systemd units distributed with installed RPM packages.
/run/systemd/system/Systemd units created at run time. This directory takes precedence over the directory with installed service units.
/etc/systemd/system/Systemd units created and managed by the system administrator. This directory takes precedence over the directory with runtime units.
Some of the benefits of systemd over the traditional System V init facility include:
  • systemd never loses initial log messages
  • systemd can respawn daemons as needed
  • systemd records runtime data (i.e., captures stdout/stderr of processes)
  • systemd doesn't lose daemon context during runtime
  • systemd can kill all components of a service cleanly
Here runlevels are replace by the target as follows:

Traditional runlevel      New target name     Symbolically linked to...
Runlevel 0           |    runlevel0.target -> poweroff.target
Runlevel 1           |    runlevel1.target -> rescue.target
Runlevel 2           |    runlevel2.target -> multi-user.target
Runlevel 3           |    runlevel3.target -> multi-user.target
Runlevel 4           |    runlevel4.target -> multi-user.target
Runlevel 5           |    runlevel5.target -> graphical.target
Runlevel 6           |    runlevel6.target -> reboot.target 
The default runlevel (which previously set in the /etc/inittab file) is now replaced by a default target. The location of the default target is /etc/systemd/system/default.target, which by default is linked to the multi-user target.

Comments