LinuxCommandLibrary

launchctl

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)
$ launchctl bootstrap gui/[uid] [/path/to/service.plist]
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/disable
Enable/disable service.

CAVEATS

macOS only. Modern subcommands differ from legacy. System services need root. GUI services need user domain.

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