init

From Wikipedia, the free encyclopedia

Template:Short description Script error: No such module "about".

Page Module:Message box/ambox.css has no content.

Version 7 Unix: Page Template:Mono/styles.css has no content./etc listing, showing Page Template:Mono/styles.css has no content.init and Page Template:Mono/styles.css has no content.rc
Version 7 Unix: contents of an Page Template:Mono/styles.css has no content./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 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

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-style

Page Template:Mono/styles.css has no content.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.

Runlevels

Script error: No such module "labelled list hatnote".

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:

  1. Turn off
  2. Single-user mode (also known as S or s)
  3. Reboot

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.

Default runlevels

Operating system Default runlevel
AIX 2[10]
antiX 5
Gentoo Linux 3[11]
HP-UX 3 (console/server/multiuser) or 4 (graphical)
Slackware Linux 3
Solaris / illumos 3[12]
UNIX System V Releases 3.x, 4.x 2
UnixWare 7.x 3

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

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:

General

Template:Sort-under

Name Developer Latest release License Notes
Version Date
BootScripts GoboLinux Scripts Contributors[14] 016.02 Template:Dts; 8 years ago Template:Open source [a]
busybox-init Bruce Perens etc.[15][16][17] Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [b]
dinit Davin McCall[18] Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [c]
Epoch Epoch Contributors[19] 1.3.0 Template:Dts; 11 years ago Template:Open source [d]
finit Joachim Wiberg, etc.[21] 4.16[21] Template:Dts; 5 months ago Template:Open source
ginitd S. M. Wood-Mattheusson [e]
Initng Initng Contributors[23] 0.6.10.2 Template:Dts; 19 years ago Template:Open source[23] [f]
launchd Apple Inc. 10.4 Template:Dts; 21 years ago Proprietary (was APSL then AL2) [g]
OpenRC OpenRC Developers Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [h]
procd Daniel Golle, etc.[24] Template:Dts; 4 months ago Template:Open source
runit Gerrit Pape, runit Developers Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [i]
Service Management Facility (SMF) Sun Microsystems 5.10 Template:Dts; 21 years ago Template:Open source [j]
Shepherd Template:Wikidata[26]etc.[27] Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [k]
s6 Laurent Bercot[29] Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source [l]
systemd Red Hat[32]345 in 2018[33]2,032 total[34] Template:Wikidata Template:Dts; Error: first parameter cannot be parsed as a date or time. Template:Open source[35] [m]
SystemStarter Wilfredo Sanchez 10.4 Template:Dts; 21 years ago Template:Open source [n]
Upstart Canonical Ltd. 1.13.2[37] Template:Dts; 11 years ago Template:Open source [o]
Name Developer Latest release License Notes
Version Date

Page Template:Reflist/styles.css has no content.

  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.[18]
  4. ^ Epoch, a single-threaded Linux init system focused on simplicity and service management[20]
  5. ^ ginitd, a software package that consists of an init system and a service management system[22]
  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[25]
  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[28]
  12. ^ s6, a software suite that includes an init system[30][31]
  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, systemd has been adopted by most major Linux distributions.[36]
  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,[38][39] Red Hat Enterprise Linux 6[40] and Google's ChromeOS.[41]

Operating system support

Name Linux BSD Darwin Other
BootScripts Yes No No No
busybox-init Yes No No No
dinit Yes Yes Yes No
Epoch Yes No No No
finit Yes No No No
Initng Yes No No No
launchd No No Yes No
OpenRC Yes Yes No No
procd Yes No No No
runit Yes Yes Yes No
Service Management Facility (SMF) No No No Solaris
Shepherd Yes No No GNU Hurd
s6 Yes Yes Yes No
systemd Yes No No No
SystemStarter No No Yes No
Upstart Yes No No No
Name Linux BSD Darwin Other

Compatibility, interface and programming

Comparison of init systems[42][43]
Name musl
libc
compatible
dependency
free
script/
service
format
Plain
log
format
Per-
service
config
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%[44] Script error: No such module "Number table sorting".
[44]
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%[18] Script error: No such module "Number table sorting".
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%[45] Script error: No such module "Number table sorting".[45]
finit ? ? multiple
or single
.conf
Yes ? ? Yes Yes C 86.7%; shell script 9.7%; Automake 1.8%; Autoconf 1.5%; Make 0.3%[46] Script error: No such module "Number table sorting".[46]
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%[47] Script error: No such module "Number table sorting".[47]
launchd ? Yes plist ? ? No Yes Yes C 96.1%; shell script 2.2%; C++ 1.3%; Make 0.4%; XML 0.1%[48] Script error: No such module "Number table sorting".[48]
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%[49] Script error: No such module "Number table sorting".[49]
procd ? ? Shell
scripts[50]
? Yes[50] ? ? Yes[51] C 98.8%; CMake 0.8%; shell script 0.4%[52] Script error: No such module "Number table sorting".[52]
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%[53] Script error: No such module "Number table sorting".[53]
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%[54] Script error: No such module "Number table sorting".[54]
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%[55] Script error: No such module "Number table sorting".[55]
systemd Limited dbus udev dns ntp GNOME NetworkManager PipeWire ...[42] 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%[56] Script error: No such module "Number table sorting".
[56]
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%[57] Script error: No such module "Number table sorting".
[57]
Name musl
libc
compatible
dependency
free
script/
service
format
Plain
log
format
Per-
service
config
Cross-
service
events
Parallel
service
startup
Process
supervision
Programming language Codebase
size
(lines)

See also

References

Page Template:Reflist/styles.css has no content.

  1. ^ Page Module:Citation/CS1/styles.css has no content."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. ^ Template:Man
  3. ^ Template:Man
  4. ^ Template:Man
  5. ^ Template:Man
  6. ^ Template:Man
  7. ^ Template:Man
  8. ^ Page Module:Citation/CS1/styles.css has no content.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. ^ Page Module:Citation/CS1/styles.css has no content."init(8)". minnie.tuhs.org. Archived from the original on 2021-07-27. Retrieved 2015-09-12.
  10. ^ Page Module:Citation/CS1/styles.css has no content."System run level". IBM. Archived from the original on 2026-03-26. Retrieved 2026-03-26.
  11. ^ Page Module:Citation/CS1/styles.css has no content."Initscripts". Gentoo Linux Documentation. Gentoo.org. 2014-12-13. Archived from the original on 2020-12-03. Retrieved 2020-12-08.
  12. ^ Page Module:Citation/CS1/styles.css has no content."Run Levels". Oracle Solaris Administration: Common Tasks. Oracle. Archived from the original on 2016-04-10. Retrieved 2017-11-14.
  13. ^ Page Module:Citation/CS1/styles.css has no content."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 Page Module:Citation/CS1/styles.css has no content."gobolinux/Scripts: 🧰 The GoboLinux scripts collection". GitHub. Retrieved 2026-04-25.
  15. ^ Page Module:Citation/CS1/styles.css has no content."Erik Andersen's Homepage". Archived from the original on June 13, 2010. Retrieved December 23, 2009.
  16. ^ Active Projects Script error: No such module "webarchive"., Rob Landley's website
  17. ^ Denys Vlasenko Script error: No such module "webarchive"., BusyBox maintainer
  18. ^ a b c Page Module:Citation/CS1/styles.css has no content."GitHub - davmac314/dinit: Service monitoring / "init" system". GitHub. Archived from the original on 2021-12-12. Retrieved 2021-12-12.
  19. ^ Page Module:Citation/CS1/styles.css has no content."GitHub - Subsentient/epoch: The Epoch Init System". GitHub. Retrieved 2026-04-25.
  20. ^ Page Module:Citation/CS1/styles.css has no content."Epoch Init System Homepage". Archived from the original on 2014-08-02. Retrieved 2014-07-31.
  21. ^ a b Page Module:Citation/CS1/styles.css has no content."GitHub - finit-project/finit: Fast init for Linux. Cookies included". GitHub. Retrieved 2026-04-25.
  22. ^ Page Module:Citation/CS1/styles.css has no content.Wood-Mattheusson, S. M. (2024-12-16). "ginitd: det effektivaste init-systemet".
  23. ^ a b Page Module:Citation/CS1/styles.css has no content."initng/initng: InitNG core components". GitHub. Retrieved 2026-04-25.
  24. ^ Page Module:Citation/CS1/styles.css has no content."GitHub - openwrt/procd: [MIRROR] OpenWrt service / process manager". GitHub. Retrieved 2026-04-25.
  25. ^ Page Module:Citation/CS1/styles.css has no content."Void Linux main page". Archived from the original on 2020-08-29. Retrieved 2020-08-31.
  26. ^ Page Module:Citation/CS1/styles.css has no content."GNU Shepherd Open Source Project on Open Hub: Contributor Ludovic Courtès". Open Hub. Retrieved 2026-04-25.
  27. ^ Page Module:Citation/CS1/styles.css has no content."GNU Shepherd Open Source Project on Open Hub: Contributors". Open Hub. Retrieved 2026-04-25.
  28. ^ Page Module:Citation/CS1/styles.css has no content."The Shepherd - GNU Project". Free Software Foundation, Inc. Archived from the original on 2016-02-12. Retrieved 2016-01-16.
  29. ^ Page Module:Citation/CS1/styles.css has no content."skarnet/s6". GitHub. Retrieved 2026-04-25.
  30. ^ Page Module:Citation/CS1/styles.css has no content."s6: why another supervision suite". Archived from the original on 2021-09-13. Retrieved 2021-09-13.
  31. ^ Page Module:Citation/CS1/styles.css has no content."s6 init system". Archived from the original on 2021-09-13.
  32. ^ Page Module:Citation/CS1/styles.css has no content."systemd README", freedesktop.org, archived from the original on 7 July 2013, retrieved 9 September 2012
  33. ^ Page Module:Citation/CS1/styles.css has no content."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.
  34. ^ Used the "contributors" statistic from: Page Module:Citation/CS1/styles.css has no content.systemd/systemd, systemd, 2023-12-03, retrieved 2023-12-03
  35. ^ Page Module:Citation/CS1/styles.css has no content.Poettering, Lennart (21 April 2012), systemd Status Update, archived from the original on 23 April 2012, retrieved 28 April 2012
  36. ^ See Systemd#Adoption
  37. ^ Page Module:Citation/CS1/styles.css has no content."1.13.2 "It looks lush from the side" : Series 1.x : upstart". Launchpad. Retrieved 2022-01-01.
  38. ^ Page Module:Citation/CS1/styles.css has no content.Fedora 14 Accepted Features, 2010-07-13, archived from the original on 2022-03-27, retrieved 2010-07-13
  39. ^ Page Module:Citation/CS1/styles.css has no content."Fedora defers systemd to F15". Linux Weekly News. 2010-09-14. Archived from the original on 2010-09-19. Retrieved 2010-09-17.
  40. ^ Page Module:Citation/CS1/styles.css has no content."Deployment". Red Hat Enterprise Linux 6: Technical Notes. Red Hat. Archived from the original on 2018-08-29. Retrieved 2013-12-31.
  41. ^ Page Module:Citation/CS1/styles.css has no content.Software Architecture: Chromium OS design documents, archived from the original on 9 April 2022, retrieved 25 January 2014
  42. ^ a b Page Module:Citation/CS1/styles.css has no content."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. [...] GNOME's dependency on logind, NetworkManager's integration with systemd-networkd, and PulseAudio's replacement by PipeWire — which also integrates deeply with systemd session management
  43. ^ Page Module:Citation/CS1/styles.css has no content."Comparison of init systems - Gentoo wiki". 2025-09-16. Retrieved 2026-04-25.
  44. ^ a b Page Module:Citation/CS1/styles.css has no content."The BusyBox Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  45. ^ a b Page Module:Citation/CS1/styles.css has no content."The Epoch Init System Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  46. ^ a b Page Module:Citation/CS1/styles.css has no content."The finit Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  47. ^ a b Page Module:Citation/CS1/styles.css has no content."The InitNG Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  48. ^ a b Page Module:Citation/CS1/styles.css has no content."The Open launchd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  49. ^ a b Page Module:Citation/CS1/styles.css has no content."The OpenRC Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  50. ^ a b Page Module:Citation/CS1/styles.css has no content.stokito (2025-11-18). "[OpenWrt Wiki] The UCI system". Retrieved 2026-04-25.
  51. ^ Page Module:Citation/CS1/styles.css has no content.bluewavenet (2025-02-18). "[OpenWrt Wiki] Procd system init and daemon management". Retrieved 2026-04-25.
  52. ^ a b Page Module:Citation/CS1/styles.css has no content."The openwrt-procd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  53. ^ a b Page Module:Citation/CS1/styles.css has no content."The runit Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  54. ^ a b Page Module:Citation/CS1/styles.css has no content."The GNU Shepherd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  55. ^ a b Page Module:Citation/CS1/styles.css has no content."The s6 Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  56. ^ a b Page Module:Citation/CS1/styles.css has no content."The systemd Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.
  57. ^ a b Page Module:Citation/CS1/styles.css has no content."The Upstart Open Source Project on Open Hub: Languages Page". Open Hub. Retrieved 2026-04-25.

Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.