load or unload daemons with launchd in macOS Archived: 2026-04-06 02:10:34 UTC SS64 macOS How-to launchctl Interfaces with launchd to load, unload daemons/agents and generally control launchd. launchctl supports taking subcommands on the command line, interactively or even redirected from standard input. Syntax launchctl [subcommand [arguments ...]] Specifiers (Target domain/service) SubCommands More SubCommands .plist locations Every launchd task has a corresponding .plist file. System tasks will run whenever the system is running, even if no user is logged in. They will be started with "root" privileges. /Library/LaunchDaemons/ System tasks may also be setup to run if ANY user is logged in: /Library/LaunchAgents/ User tasks will run only if the user is logged in, and will be executed with the privileges of that user: ~/Library/LaunchAgents/ Files ~/Library/LaunchAgents  Per-user agents provided by the user. /Library/LaunchAgents    Per-user agents provided by the administrator. /Library/LaunchDaemons  System wide daemons provided by the administrator. https://ss64.com/osx/launchctl.html Page 1 of 4 /System/Library/LaunchAgents    macOS Per-user agents. /System/Library/LaunchDaemons  macOS System wide daemons. launchd no longer loads configuration files from the network Exit Codes launchctl will exit with status 0 if the subcommand succeeded. Otherwise, it will exit with an error code that can be given to the error subcommand to be decoded into human-readable form. The syntax for launchctl changed in macOS 10.10 (Yosemite) the examples below show both the old and new syntax for starting and stopping launch scripts (services). The new syntax generally does not require sudo. Examples Display the launch scripts for all users that are currently loaded/running (legacy syntax): $ sudo launchctl list Display the launch scripts that are currently loaded for user ID 504 (new syntax): $ launchctl print gui/504 Display the launch scripts that are currently loaded/running for root: $ launchctl print system Disable the Amazon Music App daemon, to re-enable this, replace unload with load in the command: $ launchctl unload ~/Library/LaunchAgents/com.amazon.music.plist To make this permanent edit that .plist file and change KEEP ALIVE and LAUNCH AT LOAD to FALSE. Then lock the file. This will prevent the Amazon app from running at all. Restart the SMB service (legacy syntax): # stop sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist # start sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist Load SMB preferences: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smb.preferences.plist Disable Adobe CC services, to re-enable this, replace unload with load in the command: $ launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist https://ss64.com/osx/launchctl.html Page 2 of 4 Enable remote SSH login (legacy syntax): $ sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist Enable remote SSH login for login 504 (new syntax): $ launchctl bootstrap gui/504 /System/Library/LaunchDaemons/ssh.plist Disable remote SSH login (legacy syntax): $ sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist Disable remote SSH login for login 504 (new syntax): $ launchctl bootout gui/504 /System/Library/LaunchDaemons/ssh.plist Disable the macOS Notification Centre (legacy syntax): $ launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist $ killall NotificationCenter Disable the macOS Notification Centre for login 504 (new syntax): $ launchctl bootout gui/504 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist $ killall NotificationCenter An alternative is to turn on the Notification “Do Not Disturb” from the Menu Bar of macOS which lasts for 1 day. Re-enable the macOS Notification Centre (legacy syntax): $ launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist Then double-click "/System/Library/CoreServices/Notification Center” to launch it again. Re-enable the macOS Notification Centre for login 504 (new syntax): $ launchctl bootstrap gui/504 /System/Library/LaunchAgents/com.apple.notificationcenterui.plist Then double-click "/System/Library/CoreServices/Notification Center” to launch it again. “A good rule for rocket experimenters to follow is this: always assume that it will explode” ~ 'Astronautics' issue 38, October 1937 Related macOS commands Local man page: launchctl - Command line help page on your local machine. csrutil - Configure System Integrity Protection (SIP). sysctl - Get or set kernel state. nvram - Manipulate firmware variables. https://ss64.com/osx/launchctl.html Page 3 of 4 The macOS equivalent of Windows services is Launchd. The macOS equivalent of services.msc on Windows is launchctl. Launchd.info - Description of launchd, agents and daemons. Launched - An online launchd plist generator. LaunchControl - A GUI .plist editor with features to create, manage and debug Mac services. The daemons managed by launchd can be on demand or can be triggered periodically (this is configurable in launchd.plist). launchd.plist(5), launchd.conf(5), launchd(8). Copyright © 1999-2026 SS64.com Some rights reserved Source: https://ss64.com/osx/launchctl.html https://ss64.com/osx/launchctl.html Page 4 of 4