{"id":1015,"date":"2018-02-09T12:37:58","date_gmt":"2018-02-09T11:37:58","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=1015"},"modified":"2018-02-09T12:37:58","modified_gmt":"2018-02-09T11:37:58","slug":"disable-services-on-osx-in-terminal","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=1015","title":{"rendered":"Disable services on OSX in terminal"},"content":{"rendered":"<p>\n\tList all your services:\n<\/p>\n<pre>\r\n$ launchctl list<\/pre>\n<p>\n\tList a specific service:\n<\/p>\n<pre>\r\n$ launchctl list | grep &quot;my service&quot;<\/pre>\n<p>\n\tThe result will be in the format PID \/ Status \/ Label. If PID is marked as &quot;-&quot; then the service is not started.\n<\/p>\n<p>\n\tGet infos about the service:\n<\/p>\n<pre>\r\n$ sudo launchctl procinfo &lt;PID&gt;<\/pre>\n<p>\n\tor get path and domain:\n<\/p>\n<pre>\r\n$ sudo launchctl procinfo &lt;PID&gt; | grep -E &quot;(domain|path)&quot;<\/pre>\n<p>\n\tNow that you have the path to the plist file (path =&gt; &lt;PLIST FILE&gt;) and the user under which the service is started (domain =&gt; .user.XXX. =&gt; &lt;UID&gt;), you can disable the service by two ways: disable per user or disable systemwide.\n<\/p>\n<p>\n\tDisable per user:\n<\/p>\n<pre>\r\n$ launchctl disable user\/&lt;UID&gt;\/&lt;LABEL&gt;<\/pre>\n<p>\n\tDisable systemwide:\n<\/p>\n<pre>\r\n$ sudo launchctl unload -w &lt;PLIST FILE&gt;<\/pre>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>List all your services: $ launchctl list List a specific service: $ launchctl list | grep &quot;my service&quot; The result will be in the format PID \/ Status \/ Label. If PID is marked as &quot;-&quot; then the service is not started. Get infos about the service: $ sudo launchctl procinfo &lt;PID&gt; or get path [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1015","post","type-post","status-publish","format-standard","hentry","category-mac-osx"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1015"}],"version-history":[{"count":1,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1015\/revisions"}],"predecessor-version":[{"id":1016,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1015\/revisions\/1016"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}