{
    "mode": "man",
    "parameter": "runit",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/runit/8/json",
    "generated": "2026-08-29T13:20:02Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "runit - a UNIX process no 1\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "runit",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "runit must be run as Unix process no 1.  It performs the system's booting, running, and shut‐\ndown in three stages:\n",
            "subsections": []
        },
        "STAGE 1": {
            "content": "runit  runs /etc/runit/1 and waits for it to terminate.  The system's one time tasks are done\nhere.  /etc/runit/1 has full control of /dev/console to be able to start an  emergency  shell\nif  the one time initialization tasks fail. If /etc/runit/1 crashes, or exits 100, runit will\nskip stage 2 and enter stage 3.\n",
            "subsections": []
        },
        "STAGE 2": {
            "content": "runit runs /etc/runit/2, which should not return until system shutdown; if it crashes, or ex‐\nits 111, it will be restarted.  Normally /etc/runit/2 starts runsvdir(8).  runit is  able  to\nhandle the ctrl-alt-del keyboard request in stage 2, see below.\n",
            "subsections": []
        },
        "STAGE 3": {
            "content": "If  runit  is told to shutdown the system, or stage 2 returns, it terminates stage 2 if it is\nrunning, and runs /etc/runit/3.  The systems tasks to shutdown and possibly  halt  or  reboot\nthe system are done here.  If stage 3 returns, runit checks if the file /run/runit.reboot ex‐\nists and has the execute by owner permission set.  If so, the system is rebooted, it's halted\notherwise.   If  /etc/runit/nosync  exists,  runit  doesn't  invoke sync(). This is useful in\nvservers.\n",
            "subsections": []
        },
        "CTRL-ALT-DEL": {
            "content": "If runit receives the ctrl-alt-del keyboard request and the file /etc/runit/ctrlaltdel exists\nand has the execute by owner permission set, runit runs /etc/runit/ctrlaltdel, waits  for  it\nto terminate, and then sends itself a CONT signal.\n",
            "subsections": []
        },
        "SIGNALS": {
            "content": "runit only accepts signals in stage 2.\n\nIf  runit receives a CONT signal and the file /run/runit.stopit exists and has the execute by\nowner permission set, runit is told to shutdown the system.\n\nIf runit receives a PWR signal, runit is told to shutdown the system.\n\nif runit receives an INT signal, a ctrl-alt-del keyboard request is triggered.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "When the runitdir=name variable is set and runit is init, runit will  check  if  a  directory\nnamed  name  exists in /etc/runit/runsvdir/ and then will use runsvchdir to change the direc‐\ntory of runsvdir to name in place of the default.\n\nIf runitdir is set to runitdir=solo runit will use the solo directory  for  runsvdir  and  it\nwill also refrain from start any sysv service that is enabled in /etc/rc2.d/ This is intended\nfor use with containers that need to start only some selected services.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "runit-init(8), runsvdir(8), runsvchdir(8), sv(8), runsv(8), chpst(8), utmpset(8), svlogd(8)\n\nhttp://smarden.org/runit/\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Gerrit Pape <pape@smarden.org>\n\nrunit(8)",
            "subsections": []
        }
    },
    "summary": "runit - a UNIX process no 1",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "runit-init",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runit-init/8/json"
        },
        {
            "name": "runsvdir",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsvdir/8/json"
        },
        {
            "name": "runsvchdir",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsvchdir/8/json"
        },
        {
            "name": "sv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sv/8/json"
        },
        {
            "name": "runsv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsv/8/json"
        },
        {
            "name": "chpst",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/chpst/8/json"
        },
        {
            "name": "utmpset",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/utmpset/8/json"
        },
        {
            "name": "svlogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/svlogd/8/json"
        }
    ]
}