In Linux and other Unix-like operating systems, the init (initialization) process is the first process executed by the kernel at boot time, which has a process ID (PID) of 1, that is executed in the background until the system is shut down.
The init process starts all other Linux processes, that is daemons, services, and other background processes, therefore, it is the mother of all other processes on the system.
A process can start many other child processes on the system, but if a parent process dies, init becomes the parent of the orphan process.
Over the years, many init systems have emerged in major Linux distributions and in this guide, we shall take a look at some of the best init systems you can work with on the Linux operating system.
1. System V Init
System V (SysV) is a mature and popular init scheme on Unix-like operating systems, it is the parent of all processes on a Unix/Linux system. SysV is the first commercial Unix operating system designed.
Almost all Linux distributions first used the SysV init scheme except Gentoo which has a custom init and Slackware which uses the BSD-style init scheme.
As years have passed by, due to some imperfections, several SysV init replacements have been developed in the quest to create more efficient and perfect init systems for Linux.
Although these alternatives seek to improve SysV and probably offer new features, they are still compatible with original SysV init scripts.
2. SystemD
SystemD is a relatively new init scheme on the Linux platform. Introduced in Fedora 15, it is an assortment of tools for easy system management. The main purpose is to initialize, manage, and keep track of all system processes in the boot process and while the system is running.
Systemd init is comprehensively distinct from other traditional Unix init systems, in the way it practically approaches system and services management. It is also compatible with SysV and LBS init scripts.
It has some of the following eminent features:
- Clean, straightforward, and efficient design
- Concurrent and parallel processing at bootup
- Better APIv
- Enables removal of optional processes
- Supports event logging using journald
- Supports job scheduling using systemd calendar timers
- Storage of logs in binary files
- Preservation of systemd state for future reference
- Better integration with GNOME plus many more
3. Upstart
Upstart is an event-based init system developed by the makers of Ubuntu as a replacement for the SysV init system. It starts different system tasks and processes, inspects them while the system is running, and stops them during system shutdown.
It is a hybrid init system that uses both SysV startup scripts and Systemd scripts, some of the notable features of the Upstart init system include:
- Originally developed for Ubuntu Linux but can run on all other distributions
- Event-based starting and stopping of tasks and services
- Events are generated during the starting and stopping of tasks and services
- Events can be sent by other system processes
- Communication with the init process through D-Bus
- Users can start and stop their processes
- Re-spawning of services that die abruptly and many more
4. OpenRC
OpenRC is a dependency-based init scheme for Unix-like operating systems, it is compatible with SysV init. As much as it brings some improvements to Sys V, you must keep in mind that OpenRC is not an absolute replacement for the /sbin/init file.
It offers some illustrious features including:
- It can run on other many Linux distributions including Gentoo and also on BSD
- Supports hardware-initiated init scripts
- Supports a single configuration file
- No per-service configurations supported
- Runs as a daemon
- Parallel services startup and many more
5. runit
runit is also a cross-platform init system that can run on GNU/Linux, Solaris, *BSD, and Mac OS X and it is an alternative to SysV init, which offers service supervision.
It comes with some benefits and remarkable components not found in SysV init and possibly other init systems in Linux and these include:
- Service supervision, where each service is associated with a service directory
- A clean process state guarantees each process a clean state
- It has a reliable logging facility
- Fast system boot-up and shutdown
- It is also portable
- Packaging friendly
- Small code size and many more
6. s6
s6 offers a compact set of tools for UNIX, tailored for process supervision, similar to daemontools and runit. It facilitates operations on processes and daemons.
Designed as a low-level service administration toolkit, s6 provides diverse tools that can function independently or within its framework. These tools, when combined, deliver robust functionality with minimal code.
As I had earlier mentioned, the init system starts and manages all other processes on a Linux system. Additionally, SysV is the primary init scheme on Linux operating systems, but due to some performance weaknesses, system programmers have developed several replacements for it.
Here, we looked at a few of those replacements, but there could be other init systems that you think are worth mentioning in this list. You can let us know of them via the comment section below.
OpenRC doesn’t work on my PC, so I only use systemd distros.
SysremD is an init that wants be a distro. With each new version of systemd, it makes more and more processes and programs dependent on it.
“easy system management”
Only if you call using all binary log files “easy”. Most other inits use simple text files which can be read easily using any text editor or word processor. To read systemd log files, one needs special programs.
“Clean, straightforward, and efficient design ”
As clean and straight forward as a dog’s broken hind leg. US Tax Code is written more efficiently.
“Concurrent and parallel processing at bootup”
Considering that Linux systems are designed to (and many do) run long periods of time between reboots, what kind of advantage is that? Parallel processing on start-up saves you, maybe, seconds once a month or once a year? How is that an advantage?
“Enables removal of optional processes ”
So do other inits.
“Supports job scheduling using systemd calendar timers ”
All other distros use CRON. Systemd has to be different.
“Storage of logs in binary files ”
Precisely! Files cannot be easily read.
“Better integration with GNOME ”
What good is that if you use another Desktop Environment or just use a Windows Manager?
SystemD is a hopeless kludge that’s been foisted on the Linux community. Popularity does not mean quality. After all, the most used operating system is Windows and we know what kind of mess that is. If Windows was a quality product, most of us would still be using it.