Runit

is Article description::an init replacement with service monitoring/supervision. It can be used in conjunction with OpenRC as an alternative to sysvinit or even replacing OpenRC as service manager.

PID 1 - init replacement
runit can be used as the system init. To do this, simply add  to the bootloader's kernel command-line and reboot. OpenRC (sysvinit) will remain installed and you go back to it at any time by reverting the change.

Out of the box has a very minimal configuration which will only get to a console login. Although it would be optimal to have all the daemons started up in a single consistent way, users are free to mix and match between runit and OpenRC as desired. Init scripts can be found in the "default" runlevel, which can be started automatically on boot with the existing "local" service:

Alternatively, add  to  as seen below:

Or, for those who prefer to do it manually:

Reboot and shutdown
Runit is not directly compatible with sysvinit's, , , , and commands, however many programs (e.g. desktop environments) expect to be able to call some of these during operation.

sysvinit's functionality can be restored using some one-liner, workaround shell scripts:

Init and service manager
Runit can also replace OpenRC as the service manager. To achieve this, delete all lines starting with  in. However, one will have to replace the boot scripts and OpenRC's service scripts with it's own (or use an overlay) that do the same tasks (to see what tasks are being executed by OpenRC, one could run and ).

OpenRC supervision service
Runit can supervise processes without running as init, or even necessarily as root:

Local service
OpenRC can start this for you using (see  for more details):

OpenRC service
This does the same as the script above, but using OpenRC proper. As such, you can use the extra features it provides like init script multiplexing.

External resources

 * Arch Linux Wiki
 * Gentoo Forums
 * Void Linux Wiki
 * supervision-scripts: a large, modular collection of scripts that can be used with runit.
 * powerman-overlay: an overlay which contains many runit service files.