Differences

This shows you the differences between two versions of the page.

Link to this comparison view

launchctl [2014/09/19 14:49]
launchctl [2014/09/19 14:49] (current)
Line 1: Line 1:
 +====== launchctl ======
  
 +  * [[Darwin]]
 +  * [[OS X]]
 +
 +== Display what services are loaded ==
 +
 +<​code>​
 +launchctl list
 +</​code>​
 +
 +== Force a service to be launched ==
 +
 +Fixes "​nothing found to load":
 +
 +<​code>​
 +launchctl load -w -F [plist.file]
 +</​code>​
 +
 +== Add to init services, and start ==
 +
 +Will always run:
 +
 +<​code>​
 +launchctl load /​Library/​LaunchDaemons/​homebrew.mxcl.dnsmasq.plist
 +</​code>​
 +
 +== Remove from init system ==
 +
 +<​code>​
 +launchctl unload /​Library/​LaunchDaemons/​homebrew.mxcl.dnsmasq.plist
 +</​code>​
 +
 +== Start a service manually ==
 +
 +<​code>​
 +launchctl start /​Library/​LaunchDaemons/​homebrew.mxcl.dnsmasq.plist
 +</​code>​
 +
 +== Stop a service ==
 +
 +<​code>​
 +launchctl stop /​Library/​LaunchDaemons/​homebrew.mxcl.dnsmasq.plist
 +</​code>​
 +
 +==== Apache ====
 +
 +Unload and load a system service:
 +
 +<​code>​
 +launchctl unload /​System/​Library/​LaunchDaemons/​org.apache.httpd.plist
 +</​code>​
 +
 +<​code>​
 +launchctl load /​System/​Library/​LaunchDaemons/​org.apache.httpd.plist
 +</​code>​