What is SysVinit?

Article 1 of 15
What Is SysVinit?

It’s an init system. And what does that mean?

What is an Init System?

An init system is the software responsible for bringing a Unix-like operating system from its initial boot state to a usable, running system.

When you turn on your computer, the Linux kernel is eventually loaded and started. But the kernel isn’t alone. Something needs to start the programs and services that make the system useful: networking, logging, a display manager, background services, and eventually your desktop or other user environment.

That is where the init system comes in.

It’s the first user-space process started by the kernel and is assigned process ID 1 (PID 1).

From there, init begins the process of bringing the rest of the system into its normal operating state.

Where Does the Name Come From?

The name SysVinit comes from System V (SysV) Unix, a major version of Unix developed by AT&T in the 1980s.

System V established conventions for starting and stopping services and organizing the system’s different operating states. Those conventions became enormously influential and were adopted by Linux distributions as well.

SysVinit is therefore not simply one particular program. The term is commonly used to describe both the init program itself and the broader set of conventions and mechanisms built around it.

How Does It Work?

One of the characteristics of SysVinit is that much of what it does can be seen directly in the filesystem.

For example, BcalcOS has an /etc/init.d/ directory containing init scripts. These scripts are responsible for starting and stopping individual services.

An init script is generally a shell script. It can be opened, read, and examined with ordinary tools.

It isn’t simply a collection of shell scripts, though. Other supporting tools and conventions are involved as well. But the basic approach is relatively straightforward: init uses established Unix mechanisms and scripts to bring services into the desired operating state.

SysVinit Today

It is mature, well understood, and still used today, although other init systems have overtaken it in popularity. Devuan, Artix, and Gentoo are three examples of modern Linux environments that continue to support SysVinit.

Some of the other init systems include OpenRC, runit, Dinit, and systemd. They make different design choices but all address the same fundamental problem of bringing an OS from its initial state to a usable running state.

Why Does BcalcOS Use SysVinit?

BcalcOS uses SysVinit because it fits the project’s preference for systems that are simple, transparent, and understandable.

I think there is value in users of various skill levels being able to look at the system, see how it is organized, and understand what is happening without having to treat the underlying machinery as a black box.

This SysVinit Series

The purpose of this SysVinit series is not to create init experts. I’m certainly not one.

The goal is to provide information so that everyday users can have a much better understanding of what happens behind the scenes when their BcalcOS computer starts, runs, and shuts down.


Next: Core Concept: Runlevels

1 Like

This is great stuff. Clear, succinct, and explained in layman’s terms. Thank you! Looking forward to future articles. I’ve been talking about you over on Reddit. I’m surprised more people aren’t making themselves known on this board. Oh well, you can lead a horse…