LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

launchctl

manages launchd services on macOS

TLDR

List loaded services
$ launchctl list
copy
Load service
$ launchctl load [/path/to/service.plist]
copy
Unload service
$ launchctl unload [/path/to/service.plist]
copy
Start service
$ launchctl start [com.example.service]
copy
Stop service
$ launchctl stop [com.example.service]
copy
Bootstrap service (modern replacement for load)
$ sudo launchctl bootstrap gui/[uid] [/path/to/service.plist]
copy
Bootout service (modern replacement for unload)
$ sudo launchctl bootout gui/[uid]/[com.example.service]
copy
Print service info
$ launchctl print gui/[uid]/[com.example.service]
copy

SYNOPSIS

launchctl subcommand [options]

DESCRIPTION

launchctl manages launchd services on macOS. It controls system and user daemons, handling service lifecycle, scheduling, and resource limits.The tool replaces traditional init scripts on macOS, using property list (plist) files to define services.

PARAMETERS

list

List loaded services.
load plist
Load service (deprecated).
unload plist
Unload service (deprecated).
start label
Start service.
stop label
Stop service.
bootstrap domain plist
Load service (modern).
bootout domain plist
Unload service (modern).
print target
Print service info.
kickstart target
Force start service.
enable service
Enable service.
disable service
Disable service.
blame target
Print reason for service being loaded/started.
dumpstate
Dump launchd state to stdout.

CAVEATS

macOS only. The load/unload subcommands are deprecated since macOS 10.10; use bootstrap/bootout instead. System services require root. GUI services use the user domain (gui/UID).

HISTORY

launchctl is part of launchd, introduced in Mac OS X 10.4 Tiger (2005) by Apple. It replaced the traditional init, xinetd, and cron systems, unifying daemon management. Dave Zarzycki led its development.

SEE ALSO

Copied to clipboard
Kai