Executables are stored in /usr/libexec
on Unix-like systems. The FHS says (section 4.7. /usr/libexec : Binaries run by other programs (optional)"
:
/usr/libexec
includes internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under/usr/libexec
.
On macOS, rootless-init
a program called by launchd
immediately after booting, is stored in /usr/libexec
.
Why would it be stored in /usr/libexec
when it is a standalone executable that could be stored in /usr/bin
or /usr/sbin
? init
and other programs not called directly by shell scripts are also stored in folders like [/usr]/{bin,sbin}
.