INITCTL(8)

πŸ“¦
version 4.14 Β· 4 versions
, in nixos 26.05, ubuntu resolute, ubuntu stonking

🌸 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 the edit command ✨
  • -f, --force β€” ignore missing files and arguments, never prompt 🫢
  • -h, --help β€” show built-in help text πŸ™‹
  • -j, --json β€” JSON output in status and cond commands πŸ€–
  • -n, --noerr β€” when scripting initctl to stop, start, restart, or signal a task or service, this option can be used to ignore error 69 (no such task or service) and instead return 0 (OK). no cap, sometimes you just don't wanna hear it πŸ’€
  • -1, --once β€” only one lap in commands like top πŸƒβ™€οΈ
  • -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 *.conf files in /etc/finit.d πŸ“‚
  • initctl create CONF β€” create .conf in /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 .conf in /etc/finit.d/available πŸ—‘οΈ
  • initctl show CONF β€” show .conf in /etc/finit.d/available πŸ‘€
  • initctl edit CONF β€” edit .conf in /etc/finit.d/available ✍️
  • initctl touch CONF β€” change (mark as modified) .conf in /etc/finit.d/available. like edit, this tells finit that a configuration has been changed and is a candidate to be reloaded (SIGHUP'ed or restarted) on initctl reload in dependency order πŸ”₯
  • initctl enable CONF β€” enable .conf in /etc/finit.d/available, i.e., add symlink in /etc/finit.d/enabled βœ…
  • initctl disable CONF β€” disable .conf in /etc/finit.d/enabled, i.e., removes symlink ❌
  • initctl reload β€” reload all (touched) *.conf in /etc/finit.d and 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/foo or net/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, default cond command. also supports the -j option for detailed JSON output πŸ€–
  • initctl cond dump [TYPE] β€” dump all, or a given type of, conditions and their status. also supports the -j option for detailed JSON output πŸ—‚οΈ
  • initctl ident [NAME] β€” display indentities of all run/task/services, or only instances matching NAME. a partial string, e.g., NAM, will not match anything 🚫
  • initctl log [NAME] β€” show ten last Finit, or NAME, 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 a SIGHUP or restart of (at least) the named service. any dependant services are also restarted.
Note: no .conf file is reloaded with this variant of the command. essentially it is the same as calling restart. except for two things: 1. if the service supports HUP (or has a reload: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 signal S to service, by name. S may be a complete signal name such as SIGHUP, or short name such as HUP, or the signal number such as 1 (SIGHUP) πŸ“‘
  • initctl restart NAME[:ID] β€” restart (stop/start) service by name πŸ”
  • initctl status NAME[:ID] β€” show service status, by name. if only NAME is 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 -j option 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: 0 halt, 6 reboot.

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 if reboot is symlinked to initctl πŸ”„
  • initctl halt β€” halt system, default if halt is symlinked to initctl 🧊
  • initctl poweroff β€” power-off system, default if poweroff is symlinked to initctl πŸ”Œ
  • initctl suspend β€” suspend system, default if suspend is symlinked to initctl 😴
  • initctl utmp show β€” raw dump of UTMP/WTMP db πŸ—ƒοΈ

πŸ¦‹ SEE ALSO πŸ¦‹

finit.conf(5) finit(8)


πŸ’œ 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