S6
S6 is a process supervision suite designed for modularity, security, and performance. It’s not just an init system — it’s a full ecosystem of tools for service management (s6-rc), logging, and system initialization (s6-linux-init). Written by Laurent Bercot, it’s the most technically sophisticated of the non-systemd inits.
S6 is actually three layers:
- s6 — core process supervision (svscan, supervise, svc)
- s6-rc — dependency-based service manager
- s6-linux-init — creates the
/sbin/initbinary
Philosophy
S6 takes the daemontools/runit model and extends it with:
- Modularity — every piece is separate and replaceable
- Security — services run with minimal privileges, no ambient authority
- Performance — fully parallel startup, designed for speed
- Reliability — automatic restart, logging, notification
Unlike runit, s6 has a real dependency-based service manager (s6-rc) with declarative service definitions. It’s the closest you can get to systemd’s feature set without the bloat.
Who uses it?
- Artix Linux — available as an alternative init
- Docker images — s6-overlay is popular for container supervision
- Embedded systems, minimal Linux builds
How it works
- Kernel starts
/sbin/init(created bys6-linux-init-maker) s6-linux-initmounts tmpfs, copies early services, execs intos6-svscans6-svscanbecomes PID 1 and starts the supervision treerc.initscript launchess6-rcwith the default runlevels6-rcresolves dependencies and starts services in order
Key concepts
| Concept | What it means |
|---|---|
s6-svscan | PID 1 — root of the supervision tree |
s6-supervise | Monitors one service directory, restarts on crash |
s6-svc | Control tool — send commands to services |
s6-rc | Dependency-based service manager (compiled database) |
s6-log | Built-in logging with auto-rotation |
| Service directories | Like runit — each service is a directory with a run script |
| Compilation | s6-rc compiles service definitions into a binary database |
Basic commands
# Start a service
s6-svc -u /run/service/sshd
# Stop a service
s6-svc -d /run/service/sshd
# Restart a service
s6-svc -r /run/service/sshd
# Check status
s6-svc -a /run/service/sshd
# With s6-rc (service manager):
s6-rc -d change sshd # start
s6-rc -d stop sshd # stop
s6-rc -d status sshd # status
Example service
/etc/s6/sv/sshd/run:
#!/bin/sh
exec /usr/bin/sshd -D
With s6-rc, you also need a service definition file:
/etc/s6/rc/sources/sshd/type:
oneshot
/etc/s6/rc/sources/sshd/up:
#!/bin/sh
s6-svc -u /run/service/sshd
Comparison with OpenRC
| OpenRC | S6 | |
|---|---|---|
| Service format | Shell scripts | run scripts + s6-rc definitions |
| Dependencies | Manual (need/use) | Automatic via s6-rc |
| Supervision | No built-in | Yes — full supervision tree |
| Logging | syslog or separate | Built-in per-service (s6-log) |
| Boot speed | Fast | Very fast |
| Complexity | Low | Medium-High |
| Flexibility | Moderate | Very high (modular) |
When to use S6
S6 is suitable for advanced users who want full process supervision with dependency-based service management and per-service logging. It offers the most features of any non-systemd init but has a steeper learning curve than OpenRC or Runit.
Users who need supervision, logging, and dependency resolution without systemd will find S6 the most capable option. Users who prefer simplicity may prefer OpenRC or Dinit.