Software
skarnet.org

# s6-linux-init

## What is it ?

s6-linux-init is a set of minimalistic tools used to create a s6-based init system, including a `/sbin/init` binary, on a Linux kernel. It is a part of the s6 ecosystem.

The resulting architecture follows the Unix philosophy (one job → one tool) as closely as possible, and is fully dedicated to the s6 way of managing a system:

- s6-svscan runs as process 1 for the whole machine lifetime.
- Every daemon is supervised.
- No logs are ever lost.
- Policy is entirely left to the user. Typically, any service manager can be run on top of s6-linux-init.

Nevertheless, the architecture is fully compliant with various empirical and historical specifications. For instance, it provides:

- utmp management compatible with sysvinit
- runlevel management, with a configurable default, overridable from the kernel command line
- sysvinit-like commands to shut the system down, including a `shutdown` command that follows the LSB specification

- Why s6-linux-init ?
- An overview of s6-linux-init
- A quickstart guide for the impatient, along with a FAQ

## Installation

### Requirements

- A Linux-based system with a standard C development environment
- GNU make, version 3.81 or later
- skalibs version 2.11.2.0 or later. It's a build-time requirement. It's also a run-time requirement (for s6-linux-init-maker) as well as a boot-time requirement (i.e. a run-time requirement for the programs used when you boot a system created with s6-linux-init-maker) if you link against the shared version of the skalibs library.
- execline version 2.8.3.0 or later. It is a build-time and boot-time requirement.
- s6 version 2.11.1.0 or later. It is a build-time and boot-time requirement.

The following optional dependencies are also supported:

- If you're using musl and want nsswitch-like functionality: nsss version 0.2.0.1 or later (build-time and boot-time)
- If you want secure utmp functionality: utmps version 0.1.1.0 or later (build-time and boot-time)

All those dependencies are build-time and run-time, except possibly skalibs, which is not needed at run time if you are linking all the other packages against the static version of libskarnet.

### Licensing

s6-linux-init is free software. It is available under the ISC license.

### Download

- The current released version of s6-linux-init is 1.0.7.3.
- Alternatively, you can checkout a copy of the s6-linux-init git repository:

       git clone git://git.skarnet.org/s6-linux-init

- There's also a GitHub mirror of the s6-linux-init git repository.

### Compilation

- See the enclosed INSTALL file for installation details.

### Upgrade notes

- This page lists the differences to be aware of between the previous versions of s6-linux-init and the current one.

## Reference

### General

- A rationale for this package
- An overview of s6-linux-init
- A quickstart page

### Commands

Unless more details are provided in an Exit codes section of a specific page, all these commands exit 0 on success, 111 if they encounter a temporary error (such as a system call failure) and 100 if they encounter a permanent error (such as a misuse).

- The `s6-linux-init-maker` program
- The `s6-linux-init` program
- The `s6-linux-init-hpr` program
- The `s6-linux-init-shutdown` program
- The `s6-linux-init-shutdownd` program
- The `s6-linux-init-telinit` program
- The `s6-linux-init-logouthookd` program
- The `s6-linux-init-echo` program
- The `s6-linux-init-nuke` program
- The `s6-linux-init-umountall` program

## Related resources

- `s6-linux-init` is discussed on the skaware and supervision mailing-lists.
- There is a `#s6` IRC channel on OFTC. Sometimes people are there and even answer questions.