Difference between revisions of "Launchctl (command)"
Jump to navigation
Jump to search
↑ https://ss64.com/osx/launchctl.html
↑ https://serverfault.com/questions/194832/how-to-start-stop-restart-launchd-services-from-the-command-line
↑ https://serverfault.com/questions/194832/how-to-start-stop-restart-launchd-services-from-the-command-line
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <code>[[wikipedia:Launchd|launchctl]]</code><ref>https://ss64.com/osx/launchctl.html</ref> macOS (command) interfaces with [[launchd]] daemon to load, unload daemons/agents and generally control launchd. | + | {{lowercase}} |
+ | <code>[[wikipedia:Launchd|launchctl]]</code><ref>https://ss64.com/osx/launchctl.html</ref> [[macOS]] (command) interfaces with [[launchd]] daemon to load, unload daemons/agents and generally control launchd. | ||
+ | * https://ss64.com/osx/launchctl.html | ||
== Folders == | == Folders == | ||
− | * <code>/System/Library/LaunchDaemons</code> | + | * <code>[[/System/Library/LaunchDaemons/]]</code> |
− | * <code>/System/Library/LaunchAgents</code> | + | * <code>[[/System/Library/LaunchAgents/]]</code> |
− | * <code>/Library/LaunchDaemons</code> | + | * <code>[[/Library/LaunchDaemons/]]</code> |
+ | == Commands == | ||
+ | * <code>sudo [[launchctl list]]</code> | ||
+ | * <code>sudo [[launchctl load]] -w /System/Library/LaunchDaemons/[[ssh.plist]]</code><ref>https://serverfault.com/questions/194832/how-to-start-stop-restart-launchd-services-from-the-command-line</ref> | ||
+ | * <code>sudo [[launchctl unload]] -w /System/Library/LaunchDaemons/ssh.plist</code> | ||
+ | * <code>sudo [[launchctl stop]] /System/Library/LaunchDaemons/YOUR_DAEMON.[[plist]]</code><ref>https://serverfault.com/questions/194832/how-to-start-stop-restart-launchd-services-from-the-command-line</ref> | ||
+ | * <code>sudo [[launchctl start]] /System/Library/LaunchDaemons/YOUR_DAEMON.plist</code> | ||
− | + | * <code>sudo launchctl stop [[com.openssh.sshd]]</code> (it will automatically restart). See also: [[Activate SSH server on macOS]] | |
− | * <code>sudo launchctl | + | |
− | + | * <code>[[launchctl kill]]</code> | |
− | |||
− | |||
− | * <code> | ||
+ | == Related == | ||
+ | * <code>[[brew services]]</code> | ||
+ | * <code>[[lsof -i -P]]</code> | ||
== See also == | == See also == | ||
− | * | + | * {{launchctl}} |
+ | [[Category:launchctl]] | ||
[[Category:macOS]] | [[Category:macOS]] | ||
− |
Latest revision as of 18:24, 22 February 2024
launchctl
[1] macOS (command) interfaces with launchd daemon to load, unload daemons/agents and generally control launchd.
Contents
Folders[edit]
Commands[edit]
sudo launchctl list
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
[2]sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
sudo launchctl stop /System/Library/LaunchDaemons/YOUR_DAEMON.plist
[3]sudo launchctl start /System/Library/LaunchDaemons/YOUR_DAEMON.plist
sudo launchctl stop com.openssh.sshd
(it will automatically restart). See also: Activate SSH server on macOS
Related[edit]
See also[edit]
launchctl
,launchctl unload
,launchctl load
,launchctl list
,launchctl start
,launchctl stop
,/System/Library/LaunchDaemons/
,launchctl stop com.openssh.sshd
,launchctl bootout
,/System/Library/LaunchDaemons/ssh.plist
Advertising: