runit-init(8)
π runit-init β the manual, but make it make sense
okay so bestie, you found the page for runit-init, and it lives in the System Manager's Manual section 8. Yes, that section 8. The one for the actual system-level, hold-my-iced-coffee, don't-touch-this-while-it's-running type of tools. Sit down, hydrate, let's go. π«Ά
β¨ NAME β¨
init β literally a UNIX process no 1. The first one. The main character. π
πΈ SYNOPSIS πΈ
init [ 0 | 6 ]
That's it. That's the whole vibe. You get two numbers to choose from and they are 0 and 6. No in-between, no "maybe later", no "surprise me". π
π¦ DESCRIPTION π¦
So runit-init is the very first process the kernel starts. First in the door, lights on, shoes off. If runit-init gets started as process no 1, it just runs, and then it replaces itself with runit(8). Handoff complete, no notes, iconic. β¨
But β and this is the plot twist β if runit-init gets started while the system is already up, you can't just run it however you feel. You have to call it as either init 0 or init 6. Pick one. Commit. π
init 0β tells the Unix process no 1 to shutdown and halt the system. To signalrunit(8)that this is a system halt request,runit-initremoves all permissions of the file/etc/runit/reboot(chmod 0), and sets the execute by owner permission of the file/etc/runit/stopit(chmod 100). Then aCONTsignal gets sent torunit(8). Bye bye, bestie. πinit 6β tells the Unix process no 1 to shutdown and reboot the system. To signalrunit(8)that this is a system reboot request,runit-initsets the execute by owner permission of the files/etc/runit/rebootand/etc/runit/stopit(chmod 100). Then aCONTsignal gets sent torunit(8). Round two, let's run it back. π₯
Note the difference, fr fr:init 0chmods/etc/runit/rebootto0, whileinit 6chmods both/etc/runit/rebootand/etc/runit/stopitto100. Two files, one file,0,100β get it wrong and your machine is doing the wrong thing. No cap.
π EXIT CODES π
runit-initreturns111on error.0in all other cases.
One number for the oopsie, one number for everything else. Simple. Clean. Slay. π
π SEE ALSO π
https://smarden.org/runit/ β go read it, the whole fam is there. π
π§ AUTHOR π§
Gerrit Pape <pape@smarden.org> β the legend, the blueprint, the moment. β
and that's the page!! π This whole thing came from the System Manager's Manual for runit-init(8), and the date on the original footer line was runit-init(8) β okay that's the manual name again, but you get it, that's where the version-and-date sign-off lives. Stay safe out there, don't init 0 on purpose unless you mean it. ππΈπ¦
π¦ where this page comes from
- alpine 3.24: runit-doc 2.3.1-r0 Β· BSD
- nixpkgs unstable: runit 2.3.1
- ubuntu resolute: runit 2.3.0-1ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: runit 2.3.1-5ubuntu1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms