Differences between System V and systemd: Difference between revisions
(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
Both [[System V]] and [[Systemd|systemd]] are init systems, used to manage processes and services on Linux systems | Both [[System V]] and [[Systemd|systemd]] are init systems, used to manage processes and services on Linux systems. | ||
An init system is responsible for starting and stopping services in the right order, controlling runlevels, and providing a way to start and stop processes. | |||
System V uses a set of init '''shell scripts''' to start and stop services. They are stored under <code>/etc/init.d</code> directory, and they are executed by the <code>init</code> process. | |||
<code>systemd</code> uses [[Systemd_Concepts#Unit_Files|unit files]], which are '''configuration files''', not executable scripts. They describe how to start and stop services, their dependencies, and so on. They are stored in <code>/usr/lib/systemd/system</code> and they are managed by the <code>systemd</code> process. | |||
System V starts services '''sequentially'''. <code>systemd</code> starts services '''in parallel''', being aware of the service dependency DAG. | |||
System V uses [[System_V#Runlevels|runlevels]] to determine which services to start and stop. A runlevel is a predefined state of the system, where only a specific set of services are running. System V has seven runlevels, numbered 0-6, where 0 represents the system shut down state, and 6 represents the system reboot state. <code>systemd</code> does not use runlevels in the same way as System V. Instead, <code>systemd</code> uses [[Systemd_Concepts#Targets|targets]], which are similar to runlevels, but provide more flexibility and control over services. | |||
System V '''does not have a built-in dependency mechanism''', which means that services must be manually configured to start and stop in the right order. <code>systemd</code> has such mechanism, which it uses to built the DAG and topologically sort it, which allows it to start and stop the services in the correct order. | |||
System V does not have a built-in logging. <code>systemd</code> does. |
Latest revision as of 21:28, 19 August 2023
Internal
Overview
Both System V and systemd are init systems, used to manage processes and services on Linux systems.
An init system is responsible for starting and stopping services in the right order, controlling runlevels, and providing a way to start and stop processes.
System V uses a set of init shell scripts to start and stop services. They are stored under /etc/init.d
directory, and they are executed by the init
process.
systemd
uses unit files, which are configuration files, not executable scripts. They describe how to start and stop services, their dependencies, and so on. They are stored in /usr/lib/systemd/system
and they are managed by the systemd
process.
System V starts services sequentially. systemd
starts services in parallel, being aware of the service dependency DAG.
System V uses runlevels to determine which services to start and stop. A runlevel is a predefined state of the system, where only a specific set of services are running. System V has seven runlevels, numbered 0-6, where 0 represents the system shut down state, and 6 represents the system reboot state. systemd
does not use runlevels in the same way as System V. Instead, systemd
uses targets, which are similar to runlevels, but provide more flexibility and control over services.
System V does not have a built-in dependency mechanism, which means that services must be manually configured to start and stop in the right order. systemd
has such mechanism, which it uses to built the DAG and topologically sort it, which allows it to start and stop the services in the correct order.
System V does not have a built-in logging. systemd
does.