UNIX system component

Version 7 Unix: /etc listing, showing init and rc
Version 7 Unix: contents of an /etc/rc Bourne shell script

In Unix-like computer operating systems, init (short for initialization) is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direct or indirect ancestor of all other processes and automatically adopts all orphaned processes. Init is started by the kernel during the booting process; a kernel panic will occur if the kernel is unable to start it or if it dies for any reason. Init is typically assigned process identifier 1.

In Unix systems such as System III and System V, the design of init has diverged from the functionality provided by the init in Research Unix and its BSD derivatives. Up until the early 2010s,[1][failed verification] most Linux distributions employed a traditional init that was somewhat compatible with System V, while some distributions such as Slackware use BSD-style startup scripts, and other distributions such as Gentoo have their own customized versions.

Since then, most distros have employed a more modern init system, with most employing the init provided by the systemd project. Some distros have elected to create their own SystemV-init compatible system, such as Gentoo Linux's OpenRC and Void Linux's runit. These projects typically include features originally not in SystemV's init, such as multi-threading or interactive init. Most modern init systems are also able to dynamically start, stop and enable services after boot with prompting by the user.

Research Unix-style/BSD-style

[edit]

Research Unix init runs the initialization shell script located at /etc/rc,[2] then launches getty on terminals under the control of /etc/ttys.[3] There are no runlevels; the /etc/rc file determines what programs are run by init. The advantage of this system is that it is simple and easy to edit manually. However, new software added to the system may require changes to existing files that risk producing an unbootable system.

BSD init was, prior to 4.3BSD, the same as Research UNIX's init;[4][5] in 4.3BSD, it added support for running a windowing system such as X on graphical terminals under the control of /etc/ttys.[6][7] To remove the requirement to edit /etc/rc, BSD variants have long supported a site-specific /etc/rc.local file that is run in a sub-shell near the end of the boot sequence.

A fully modular system was introduced with NetBSD 1.5 and ported to FreeBSD 5.0, OpenBSD 4.9 and successors. This system executes scripts in the /etc/rc.d directory. Unlike System V's script ordering, which is derived from the filename of each script, this system uses explicit dependency tags placed within each script.[8] The order in which scripts are executed is determined by the rcorder utility based on the requirements stated in these tags.

sysv-rc-conf, a TUI utility that selects which SysV-style init scripts will be run in each runlevel

When compared to its predecessors, AT&T's UNIX System III introduced a new style of system startup configuration,[9] which survived (with modifications) into UNIX System V and is therefore called the "SysV-style init".

At any moment, a running System V is in one of the predetermined number of states, called runlevels. At least one runlevel is the normal operating state of the system; typically, other runlevels represent single-user mode (used for repairing a faulty system), system shutdown, and various other states. Switching from one runlevel to another causes a per-runlevel set of scripts to be run, which typically mount filesystems, start or stop daemons, start or stop the X Window System, shutdown the machine, etc.

The runlevels in System V describe certain states of a machine, characterized by the processes and daemons running in each of them. In general, there are seven runlevels, out of which three runlevels are considered "standard", as they are essential to the operation of a system:

Aside from these standard ones, Unix and Unix-like systems treat runlevels somewhat differently. The common denominator, the /etc/inittab file, defines what each configured runlevel does in a given system.

On Linux distributions defaulting to runlevel 5 in the table on the right, runlevel 5 invokes a multiuser graphical environment running the X Window System, usually with a display manager like GDM or KDM. However, the Solaris and illumos operating systems typically reserve runlevel 5 to shut down and automatically power off the machine.

On most systems, all users can check the current runlevel with either the runlevel or who -r command.[13] The root user typically changes the current runlevel by running the telinit or init commands. The /etc/inittab file sets the default runlevel with the :initdefault: entry.

On Unix systems, changing the runlevel is achieved by starting only the missing services (as each level defines only those that are started / stopped).[citation needed] For example, changing a system from runlevel 3 to 4 might only start the local X server. Going back to runlevel 3, it would be stopped again.

Other implementations

[edit]

Traditionally, one of the major drawbacks of init is that it starts tasks serially, waiting for each to finish loading before moving on to the next. When startup processes end up Input/output (I/O) blocked, this can result in long delays during boot. Speeding up I/O, e.g. by using SSDs, may shorten the delays but it does not address the root cause.

Various efforts have been made to replace the traditional init daemons to address this and other design problems, including:

Name Developer Latest release License Notes
Version Date
BootScripts GoboLinux Scripts Contributors[14] 016.02 August 16, 2017; 8 years ago GPL [a]
busybox-init Bruce Perens etc.[15][16][17] 1.36.1[18] Edit this on Wikidata 19 May 2023; 2 years ago GPL-2.0-only Since 1.3.0[19]
GPL-2.0-or-later Until 1.2.2.1[20]
[b]
dinit Davin McCall[21] 0.21.0[22] Edit this on Wikidata 9 March 2026; 48 days ago AL2 [c]
Epoch Epoch Contributors[23] 1.3.0 June 24, 2015; 10 years ago Unlicense [d]
finit Joachim Wiberg, etc.[25] 4.16[25] February 27, 2026; 58 days ago MIT
ginitd S. M. Wood-Mattheusson [e]
Initng Initng Contributors[27] 0.6.10.2 March 25, 2007; 19 years ago GPL-3.0[27] [f]
launchd Apple Inc. 10.4 April 29, 2005; 20 years ago Proprietary (was APSL then AL2) [g]
OpenRC OpenRC Developers 0.63.1[28] Edit this on Wikidata 3 April 2026; 23 days ago BSD-2-Clause [h]
procd Daniel Golle, etc.[29] March 25, 2026; 32 days ago GPL-2.0-only
runit Gerrit Pape, runit Developers 2.3.1[30] Edit this on Wikidata 7 February 2026; 2 months ago BSD-3-Clause [i]
Service Management Facility (SMF) Sun Microsystems 5.10 January 31, 2005; 21 years ago CDDL [j]
Shepherd Ludovic Courtès Edit this on Wikidata[32]etc.[33] 1.0.9[34] Edit this on Wikidata 3 December 2025; 4 months ago GPL-3.0-or-later [k]
s6 Laurent Bercot[36] 2.14.0.1[37] Edit this on Wikidata 24 January 2026; 3 months ago ISC [l]
systemd Red Hat[40]345 in 2018[41]2,032 total[42] 260.1[43] Edit this on Wikidata 23 March 2026; 34 days ago LGPL-2.1-or-later[44] [m]
SystemStarter Wilfredo Sanchez 10.4 April 29, 2005; 20 years ago BSD [n]
Upstart Canonical Ltd. 1.13.2[46] September 4, 2014; 11 years ago GPL-2.0-only [o]
Name Developer Latest release License Notes
Version Date
  1. ^ BootScripts in GoboLinux
  2. ^ busybox-init, suited to embedded operating systems, used by Alpine Linux (before being replaced with OpenRC), SliTaz 5 (Rolling), Tiny Core Linux, and VMware ESXi, and used by OpenWrt before it was replaced with procd
  3. ^ dinit, a service manager and init system.[21]
  4. ^ Epoch, a single-threaded Linux init system focused on simplicity and service management[24]
  5. ^ ginitd, a software package that consists of an init system and a service management system[26]
  6. ^ Initng, a full replacement of init designed to start processes asynchronously
  7. ^ launchd, a replacement for init in Darwin and Darwin-based operating systems such as macOS and iOS starting with Mac OS X v10.4 (it launches SystemStarter to run old-style 'rc.local' and SystemStarter processes)
  8. ^ OpenRC, a process spawner that utilizes system-provided init, while providing process isolation, parallelized startup, and service dependency; used by Alpine Linux, Gentoo and its derivatives, and available as an option in Devuan and Artix Linux.
  9. ^ runit, a cross-platform full replacement for init with parallel starting of services, used by default in Void Linux[31]
  10. ^ Service Management Facility (SMF), a complete replacement/redesign of init from the ground up in illumos/Solaris starting with Solaris 10, but launched as the only service by the original System V-style init
  11. ^ Shepherd, the GNU service and daemon manager which provides asynchronous, dependency-based initialisation; written in Guile Scheme and meant to be interactively hackable during normal system operation[35]
  12. ^ s6, a software suite that includes an init system[38][39]
  13. ^ systemd, a software suite, full replacement for init in Linux that includes an init daemon, with concurrent starting of services, service manager, and other features. Used by Debian (replaces SysV init) and Ubuntu, among other popular Linux distributions. As of February 2019[update], systemd has been adopted by most major Linux distributions.[45]
  14. ^ SystemStarter, a process spawner started by the BSD-style init in Mac OS X prior to Mac OS X v10.4
  15. ^ Upstart, a full replacement of init designed to start processes asynchronously. Initiated by Ubuntu and used by them until 2014. It was also used in Fedora 9,[47][48] Red Hat Enterprise Linux 6[49] and Google's ChromeOS.[50]

Operating system support

[edit]

Compatibility, interface and programming

[edit]
Comparison of init systems[51][52]
Name musl
libc
compatible
dependency
free
script/
service
format
Plain
log
format
Per-service
configuration
Cross-
service
events
Parallel
service
startup
Process
supervision
Programming language Codebase
size
(lines)
BootScripts ? ? Shell
scripts[14]
? ? ? ? ? Shell 66.6%; C 19.0%; Python 12.7%; Other 1.7%[14]
busybox-init ? ? ? ? ? ? ? ? C 90.4%; shell script 4.6%; C++ 1.7%; HTML 1.4%; Assembly 0.8%; Make 0.5%; XML 0.2%; Perl 0.3%; Python 0.1%[53] 319,897
[53]
dinit Yes Yes Text
config
Yes Yes Yes Yes Native C++ 96.1%; Starlark 1.0%; C 1.0%; Shell 0.9%; Makefile 0.7%; Zig 0.2%; Go 0.1%[21] ~25,000
Epoch Yes libc,
/bin/sh
multiple
or single
.conf
Yes Yes
(v1.1+)
(basic
support,
v1.3+)
No Yes C 98.2%; shell script 1.8%; Make 0.1%[54] 10,546[54]
finit ? ? multiple
or single
.conf
Yes ? ? Yes Yes C 86.7%; shell script 9.7%; Automake 1.8%; Autoconf 1.5%; Make 0.3%[55] 33,034[55]
Initng ? ? ? ? ? ? ? ? C 67.5%; Assembly 12.8%; shell script 13.2%; Python 2.7%; CMake 1.5%; Jam 1.1%; HTML 0.6%; Make 0.5%; Vim Script 0.1%[56] 59,471[56]
launchd ? Yes plist ? ? No Yes Yes C 96.1%; shell script 2.2%; C++ 1.3%; Make 0.4%; XML 0.1%[57] 28,128[57]
OpenRC Yes init
(sysv or BSD)
Shell
scripts
Yes Yes
(conf.d)
Yes Disabled
by
default
Via
external
tool
C 87.6%; shell script 12.2%; Perl 0.2%[58] 23,827[58]
procd ? ? Shell
scripts[59]
? Yes[59] ? ? Yes[60] C 98.8%; CMake 0.8%; shell script 0.4%[61] 18,832[61]
runit Yes Yes Shell
scripts
Yes No Yes Via
supervision
trees
Native C 57.4%; HTML 32.1%; shell script 6.3%; Make 4.0%; XML 0.2%[62] 11,616[62]
Service Management Facility (SMF) ? init
(sysv?)
XML
(+ shell
scripts)
Yes Yes
(service
instances)
Yes Yes Yes C
Shepherd ? ? ? ? ? ? ? ? Scheme 70.5%; shell script 28.3%; Automake 0.7%; Autoconf 0.4%[63] 6,606[63]
s6 Yes execline execline/
shell
Yes No Yes Yes Native C 48.3%; HTML 46.1%; shell script 2.8%; Autoconf 2.0%; Make 0.7%; Emacs Lisp 0.1%[64] 31,069[64]
systemd Limited D-Bus Binary-
compiled
units
No
(journald)
Yes Yes Yes Built-in
but
opaque
C 77.9%; XML 12.5%; shell script 3.9%; Python 3.2%; C++ 2.4%; CSS 0.1%[65] 1,310,214
[65]
Upstart ? ? ? ? ? ? ? ? C 93.1%; Python 2.5%; Automake 1.1%; C++ 2.4%; shell script 0.3%; XML 0.3%; Autoconf 0.1%; Vim Script 0.1%[66] 126,865
[66]
Name musl
libc
compatible
dependency
free
script/
service
format
Plain
log
format
Per-service
configuration
Cross-
service
events
Parallel
service
startup
Process
supervision
Programming language Codebase
size
(lines)
  1. ^ "Lennart Poettering on systemd's Tumultuous Ascendancy". The New Stack. 2018-11-08. Archived from the original on 2018-11-08. Retrieved 2024-01-30.
  2. ^ init(8) – Version 7 Unix Programmer's Manual
  3. ^ ttys(5) – Version 7 Unix Programmer's Manual
  4. ^ init(8) – 4.2BSD System Manager's Manual
  5. ^ ttys(5) – 4.2BSD File Formats Manual
  6. ^ init(8) – 4.3BSD System Manager's Manual
  7. ^ ttys(5) – 4.3BSD File Formats Manual
  8. ^ Andrew Smallshaw (7 December 2009). "Unix and Linux startup scripts, Part 2". Archived from the original on 18 December 2009. Retrieved 6 June 2011.
  9. ^ "init(8)". minnie.tuhs.org. Archived from the original on 2021-07-27. Retrieved 2015-09-12.
  10. ^ "System run level". IBM. Archived from the original on 2026-03-26. Retrieved 2026-03-26.
  11. ^ "Initscripts". Gentoo Linux Documentation. Gentoo.org. 2014-12-13. Archived from the original on 2020-12-03. Retrieved 2020-12-08.
  12. ^ "Run Levels". Oracle Solaris Administration: Common Tasks. Oracle. Archived from the original on 2016-04-10. Retrieved 2017-11-14.
  13. ^ "UNIX man pages : runlevel (8)". Unixhelp.ed.ac.uk. 1997-05-27. Archived from the original on 2014-07-14. Retrieved 2014-07-12.
  14. ^ a b c "gobolinux/Scripts: 🧰 The GoboLinux scripts collection". GitHub. Retrieved 2026-04-25.
  15. ^ "Erik Andersen's Homepage". Archived from the original on June 13, 2010. Retrieved December 23, 2009.
  16. ^ Active Projects Archived July 29, 2010, at the Wayback Machine, Rob Landley's website
  17. ^ Denys Vlasenko Archived September 5, 2017, at the Wayback Machine, BusyBox maintainer
  18. ^ "BusyBox 1.36.1 (stable)".
  19. ^ "License". Archived from the original on February 24, 2018. Retrieved February 23, 2018.
  20. ^ "BusyBox 1.2.2.1 changelog" (Document). BusyBox. This is the last release of BusyBox under the old 'GPLv2 or later' dual license. Future versions (containing changes after svn 16112) will just be GPLv2 only, without the 'or later'.
  21. ^ a b c "GitHub - davmac314/dinit: Service monitoring / "init" system". GitHub. Archived from the original on 2021-12-12. Retrieved 2021-12-12.
  22. ^ "Release 0.21.0". 9 March 2026. Retrieved 25 April 2026.
  23. ^ "GitHub - Subsentient/epoch: The Epoch Init System". GitHub. Retrieved 2026-04-25.
  24. ^ "Epoch Init System Homepage". Archived from the original on 2014-08-02. Retrieved 2014-07-31.
  25. ^ a b "GitHub - finit-project/finit: Fast init for Linux. Cookies included". GitHub. Retrieved 2026-04-25.
  26. ^ Wood-Mattheusson, S. M. (2024-12-16). "ginitd: det effektivaste init-systemet".
  27. ^ a b "initng/initng: InitNG core components". GitHub. Retrieved 2026-04-25.
  28. ^ "Release 0.63.1". 3 April 2026. Retrieved 7 April 2026.
  29. ^ "GitHub - openwrt/procd: [MIRROR] OpenWrt service / process manager". GitHub. Retrieved 2026-04-25.
  30. ^ "Release 2.3.1". 7 February 2026. Retrieved 25 April 2026.
  31. ^ "Void Linux main page". Archived from the original on 2020-08-29. Retrieved 2020-08-31.
  32. ^ "GNU Shepherd Open Source Project on Open Hub: Contributor Ludovic Courtès". Open Hub. Retrieved 2026-04-25.
  33. ^ "GNU Shepherd Open Source Project on Open Hub: Contributors". Open Hub. Retrieved 2026-04-25.
  34. ^ Ludovic Courtès (3 December 2025). "GNU Shepherd 1.0.9 released". Retrieved 3 December 2025.
  35. ^ "The Shepherd - GNU Project". Free Software Foundation, Inc. Archived from the original on 2016-02-12. Retrieved 2016-01-16.
  36. ^ "skarnet/s6". GitHub. Retrieved 2026-04-25.
  37. ^ "Release 2.14.0.1". 24 January 2026. Retrieved 25 April 2026.
  38. ^ "s6: why another supervision suite". Archived from the original on 2021-09-13. Retrieved 2021-09-13.
  39. ^ "s6 init system". Archived from the original on 2021-09-13.
  40. ^ "systemd README", freedesktop.org, archived from the original on 7 July 2013, retrieved 9 September 2012
  41. ^ "Systemd Hits A High Point For Number Of New Commits & Contributors During 2018 - Phoronix". Archived from the original on 21 September 2009. Retrieved 30 December 2018.
  42. ^ Used the "contributors" statistic from: systemd/systemd, systemd, 2023-12-03, retrieved 2023-12-03
  43. ^ "systemd-stable v260.1". 23 March 2026. Retrieved 25 March 2026.
  44. ^ Poettering, Lennart (21 April 2012), systemd Status Update, archived from the original on 23 April 2012, retrieved 28 April 2012
  45. ^ See Systemd#Adoption
  46. ^ "1.13.2 "It looks lush from the side" : Series 1.x : upstart". Launchpad. Retrieved 2022-01-01.
  47. ^ Fedora 14 Accepted Features, 2010-07-13, archived from the original on 2022-03-27, retrieved 2010-07-13
  48. ^ "Fedora defers systemd to F15". Linux Weekly News. 2010-09-14. Archived from the original on 2010-09-19. Retrieved 2010-09-17.
  49. ^ "Deployment". Red Hat Enterprise Linux 6: Technical Notes. Red Hat. Archived from the original on 2018-08-29. Retrieved 2013-12-31.
  50. ^ Software Architecture: Chromium OS design documents, archived from the original on 9 April 2022, retrieved 25 January 2014
  51. ^ "systemdfree.com — Because your init should do one thing". Retrieved 2026-04-25. As of 2024, the systemd project encompasses: an init daemon, a service manager, a login manager (logind), a DNS resolver (systemd-resolved), a time synchronization daemon (systemd-timesyncd), a network manager (systemd-networkd), a bootloader (systemd-boot), a home directory manager (systemd-homed), a credential manager, a container manager (systemd-nspawn), a journal binary log system (journald), a device manager (udev, absorbed in 2012), and a cryptography layer for encrypted storage. These are not plugins. They are deeply coupled components sharing internal APIs, dbus interfaces, and cgroup hierarchies.
  52. ^ "Comparison of init systems - Gentoo wiki". 2025-09-16. Retrieved 2026-04-25.
  53. ^ a b "The BusyBox Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  54. ^ a b "The Epoch Init System Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  55. ^ a b "The finit Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  56. ^ a b "The InitNG Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  57. ^ a b "The Open launchd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  58. ^ a b "The OpenRC Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  59. ^ a b stokito (2025-11-18). "[OpenWrt Wiki] The UCI system". Retrieved 2026-04-25.
  60. ^ bluewavenet (2025-02-18). "[OpenWrt Wiki] Procd system init and daemon management". Retrieved 2026-04-25.
  61. ^ a b "The openwrt-procd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  62. ^ a b "The runit Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  63. ^ a b "The GNU Shepherd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  64. ^ a b "The s6 Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  65. ^ a b "The systemd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  66. ^ a b "The Upstart Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.