INITCTL(8)
πΈ NAME πΈ
initctl β the control tool for finit, and honestly? she's that girl π
β¨ SYNOPSIS β¨
/sbin/initctl [-bcfhjlpqtvV] [COMMAND]
π DESCRIPTION π
okay so bestie, initctl is the official tool for talking to finit(8). It's the one you text when you wanna know what's going on. It comes with functions for showing status, querying the health of services, and also editing, enabling and disabling services. it's giving main character energy fr fr π
π OPTIONS π
This program follows the usual UNIX command line syntax, with long options starting with two dashes (`-`). The options are as follows:
-b,--batchβ batch mode, no screen size probing. useful for scripting π₯οΈ-c,--createβ create missing paths (and files) as needed. useful with theeditcommand β¨-f,--forceβ ignore missing files and arguments, never prompt π«Ά-h,--helpβ show built-in help text π-j,--jsonβ JSON output instatusandcondcommands π€-n,--noerrβ when scriptinginitctltostop,start,restart, or signal a task or service, this option can be used to ignore error69(no such task or service) and instead return0(OK). no cap, sometimes you just don't wanna hear it π-1,--onceβ only one lap in commands liketopπβοΈ-p,--plainβ use plain table headings, no ANSI control characters π-q,--quietβ silent, only return status of command π€«-t,--no-headingβ skip table headings βοΈ-v,--verboseβ verbose output, where applicable π£οΈ-V,--versionβ show program version β
π COMMANDS π
initctl debugβ toggle finit (daemon) debug to/dev/consoleπinitctl helpβ show built-in help text πinitctl versionβ show program version βinitctl ls | listβ list all*.conffiles in/etc/finit.dπinitctl create CONFβ create.confin/etc/finit.d/available.
Piping the contents into initctl works as one would expect:
echo "task name:foo /tmp/foo.sh -- Foo logger" | initctl create foo
initctl enable foo
initctl reload
initctl delete CONFβ delete.confin/etc/finit.d/availableποΈinitctl show CONFβ show.confin/etc/finit.d/availableπinitctl edit CONFβ edit.confin/etc/finit.d/availableβοΈinitctl touch CONFβ change (mark as modified).confin/etc/finit.d/available. likeedit, this tells finit that a configuration has been changed and is a candidate to be reloaded (SIGHUP'ed or restarted) oninitctl reloadin dependency order π₯initctl enable CONFβ enable.confin/etc/finit.d/available, i.e., add symlink in/etc/finit.d/enabledβinitctl disable CONFβ disable.confin/etc/finit.d/enabled, i.e., removes symlink βinitctl reloadβ reload all (touched)*.confin/etc/finit.dand activate changes πinitctl cond set COND [COND ...]β set (assert) user-defined condition,+usr/CONDβ¬οΈinitctl cond get CONDβ get (quietly) the status of any condition. defaults to user-defined condions, but if a slash is detected, e.g.,pid/fooornet/eth0/exist, then any condition can be read.
The command is geared for scripting, check the exit code to get the status of the condition: 0 - on, 1 - off, 255 - flux. for a more verbose output, use the -v option π
initctl cond clr | clear COND [COND ...]β clear (deassert) user-defined condition,-usr/CONDβ¬οΈinitctl cond statusβ show condition status, defaultcondcommand. also supports the-joption for detailed JSON output π€initctl cond dump [TYPE]β dump all, or a given type of, conditions and their status. also supports the-joption for detailed JSON output ποΈinitctl ident [NAME]β display indentities of all run/task/services, or only instances matchingNAME. a partial string, e.g.,NAM, will not match anything π«initctl log [NAME]β show ten last Finit, orNAME, messages from syslog πinitctl start NAME[:ID]β start service by name, with optional ID, e.g.,initctl start tty:1πinitctl stop NAME[:ID]β stop/pause a running service by name πinitctl reload NAME[:ID]β reload service as if its configuration had changed. internally, finit marks the named service as "dirty" and turns the state machine, resulting in aSIGHUPor restart of (at least) the named service. any dependant services are also restarted.
Note: no.conffile is reloaded with this variant of the command. essentially it is the same as callingrestart. except for two things: 1. if the service supportsHUP(or has areload:script) it is signaled instead of stop-started, and 2. it allows restarting run/task in the same runlevel β which is otherwise restricted
initctl <kill | signal> NAME:[ID] Sβ send signalSto service, by name.Smay be a complete signal name such asSIGHUP, or short name such asHUP, or the signal number such as1(SIGHUP) π‘initctl restart NAME[:ID]β restart (stop/start) service by name πinitctl status NAME[:ID]β show service status, by name. if onlyNAMEis given and multiple instances exits, a summary of all matching instances are shown. only an exact match displays detailed status for a given instance.
With the -q option this command is silent, provided the NAME[:ID] selection matches a single run/task/service. The exit code of initctl is non-zero if there is a problem. Zero is returned if a run/task has run (at least) once in the current runlevel, and when a service is running (as expected). See the -j option for detailed JSON output suitable for machine parsing. π
Tip: jq(1) is a useful scripting tool in combination with JSON output π«Ά
initctl statusβ show status of all services, default command. also supports the-joption for detailed JSON output πinitctl cgroupβ list cgroup config overview π§Ίinitctl psβ list processes based on cgroups πinitctl topβ show top-like listing based on cgroups πinitctl pluginsβ list installed plugins π§©initctl runlevel [0-9]β show or set runlevel:0halt,6reboot.
If called at boot (runlevel S) to set the runlevel, Finit only schedules the change, effectively overriding the configured runlevel from /etc/finit.conf. Useful to trigger a fail-safe mode, or similar π¨
initctl rebootβ reboot system, default ifrebootis symlinked toinitctlπinitctl haltβ halt system, default ifhaltis symlinked toinitctlπ§initctl poweroffβ power-off system, default ifpoweroffis symlinked toinitctlπinitctl suspendβ suspend system, default ifsuspendis symlinked toinitctlπ΄initctl utmp showβ raw dump of UTMP/WTMP db ποΈ
π¦ SEE ALSO π¦
π AUTHORS π
finit was conceived and reverse engineered by Claudio Matsuoka. Since v1.0, maintained by Joachim Wiberg, with contributions by many others. iconic behavior honestly π
and that's the whole page bestie!! this one's from the System Manager's Manual, lives on Linux, and it's dated July 10, 2025 β go forth and initctl responsibly πβ¨π
π¦ where this page comes from
- nixos 26.05: finit 4.17
- ubuntu resolute: finit 4.14-1 Β· MIT
- ubuntu stonking: finit 4.14-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms