Comparison of init systems

From Gentoo Wiki
Jump to: navigation, search

This article compares and contrasts init systems. While most of the init systems compared below are available for Gentoo, some (like launchd and SMF) are not.

Available software

Feature Init system
sysvinit / BSD init OpenRC upstart systemd SMF launchd Epoch finit runit
Supported in Gentoo partially (used by OpenRC) Yes (default init) No Yes No No Yes No Yes
Package / Bug# sys-apps/sysvinit sys-apps/openrc bug #498376
sys-apps/upstart in unity-gentoo overlay.
sys-apps/systemd - - sys-apps/epoch - sys-process/runit
Supported platforms Linux / BSD Linux + BSD Linux Linux Solaris MacOSX Linux Linux Linux
Main coding language C POSIX shell (+ C) C C C C C C C
Main dependencies - init (sysv or BSD) D-Bus D-Bus init(sysv?) - libc, /bin/sh  ? -
Init script/service format single config file shell scripts config files + shell fragments config files (ini) XML (+ shell scripts) plist multiple or single .conf multiple or single .conf shell scripts
Per-service configuration No Yes (conf.d) With in-job mechanisms (normal exit, respawn) Yes  ?  ? Yes (v1.1+)  ? No
Running as a daemon Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (invoked) Yes (PID 1) Yes (PID 1) Yes (PID 1) Yes (PID 1)
Cross-service dependencies/events No Yes Yes Yes Yes No Yes (basic support, v1.3+)  ? Yes
Parallel service startup Yes Yes (optional) Yes Yes Yes Yes No Yes Yes
Keeping daemons alive Yes Yes (optional v0.21+ via supervise-daemon) Yes Yes Yes Yes Yes Yes Yes
Preferred service file supplier n/a Gentoo Ubuntu upstream Solaris MacOSX n/a n/a Void Linux
License GPL v2+ 2-cl. BSD GPL v2 LGPL v2.1+ ? Apache License 2.0 Unlicense MIT BSD

Supported services (in Gentoo)

Feature OpenRC systemd
Filesystem mounting One script per group (root, local, network, swap...). Two units per mountpoint (fsck + mount), runtime-generated with dependencies.
getty (terminal prompts) Started through /etc/inittab. One unit per console, instantiated from template on-demand.
Networking setup Several options[1] like dhcpcd[2][3] netifrc[4] or NetworkManager.[5][6] External (NetworkManager, networkd, DHCP daemons).
X11 Display Manager setup Single service for all (required to auto-restart). Separate DM units.

See also

  • Runit — a daemontools-inspired process supervision suite that also provides a program suitable for running as process 1
  • s6 and s6-rc-based init system — an init system built using components from the s6 and s6-rc packages
  • nosh — a multi-purpose init and process supervision software package made by Jonathan de Boyne Pollard.
  • OpenRC — a dependency-based init system that maintains compatibility with the system provided init program (see the init section).

External resources