Comparison of init systems

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.
Other languages:

This article compares and contrasts init systems for Unix(like) OSs, irrespective of whether they are available for Gentoo or not. See the init system (meta) article for init system software available in Gentoo.

Init system comparison table

Feature Init system
sysvinit OpenRC systemd SMF launchd Epoch finit runit s6 + s6-rc 66 + 66-rc BSD rc.d dinit
Supported in Gentoo partially (used by OpenRC) Yes (default init) Yes No No Yes No Yes No No No No
Package / Bug# sys-apps/sysvinit sys-apps/openrc sys-apps/systemd - - sys-apps/epoch - sys-process/runit sys-apps/s6 + sys-apps/s6-rc - - -
Supported platforms Linux / BSD Linux + BSD Linux Solaris Darwin Linux Linux Linux / BSD / Darwin Linux / BSD / Darwin Linux BSD Linux / BSD / Darwin
Main coding language C POSIX shell (+ C) C C C C C C C C POSIX shell (+ C) C++
Main dependencies - init (sysv or BSD) D-Bus init(sysv?) - libc, /bin/sh ? - skalibs, execline s6, s6-rc rcorder -
Init script/service format single config file shell scripts config files (ini) XML (+ shell scripts) plist multiple or single .conf multiple or single .conf shell scripts execline or shell scripts config files + execline fragments shell scripts config files
Per-service configuration No Yes (conf.d) Yes Yes (service instances) ? Yes (v1.1+) ? No No Yes No Yes
Running as a daemon Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (invoked) Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (sys-apps/s6-linux-init) Yes (PID 1) Yes (PID 1) Yes (PID 1)
Cross-service dependencies/events No Yes Yes Yes No Yes (basic support, v1.3+) ? Yes Yes Yes Yes Yes
Parallel service startup Yes Yes (optional) Yes Yes Yes No Yes Yes Yes Yes Yes Yes
Keeping daemons alive Yes Yes (optional v0.21+ via supervise-daemon) Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Preferred service file supplier n/a Gentoo upstream Solaris MacOS n/a n/a Void Linux Artix Linux Obarun NetBSD, FreeBSD, OpenBSD Artix Linux, Chimera Linux
License GPL v2+ 2-cl. BSD LGPL v2.1+ ? Apache License 2.0 Unlicense MIT BSD ISC ISC BSD Apache License 2.0

OpenRC compared to systemd

Feature OpenRC systemd
Filesystem mounting One script per group (root, local, network, swap, etc.). Two units per mount point (fsck + mount), runtime-generated with dependencies.
getty (terminal prompts) Started through /etc/inittab or via agetty script One unit per console, instantiated from template on-demand.
Networking setup Several options like dhcpcd[1][2], netifrc, iwd, or NetworkManager.[3] Integrated (systemd-networkd), or using any of the external options mentioned prior.
X11 Display Manager setup Single service for all (required to auto-restart). Separate Display Manager units.

See also

External resources

References