MacOS – Why I don’t see all launchctl daemons/agents with “sudo launchctl list”

command linehomebrewlaunchdmacosterminal

I wish to see all launchctl daemons/agents and found How to show all running launchctl daemons/agents?

This doesn't work:

> sudo launchctl list | grep -v com.apple.
PID     Status  Label
-       0       org.postfix.master
-       0       org.cups.cupsd
-       0       com.oracle.java.Helper-Tool
-       0       com.vix.cron
244     0       org.ntp.ntpd

I doubt that I have that less Non-Apple launchctl daemons/agents.

for example I have those installed and running:

> brew services list
Name     Status  User Plist
grafana  stopped      
influxdb started fyodor /Users/fyodor/Library/LaunchAgents/homebrew.mxcl.influxdb.plist
mysql    started fyodor /Users/fyodor/Library/LaunchAgents/homebrew.mxcl.mysql.plist
redis    started fyodor /Users/fyodor/Library/LaunchAgents/homebrew.mxcl.redis.plist
telegraf started fyodor /Users/fyodor/Library/LaunchAgents/homebrew.mxcl.telegraf.plist

I don't see them with sudo launchctl list. How to get a complete list?

Best Answer

Your launchctl command only shows 'system' deameon/agents. That won't include your homebrew daemons. By experimenting, I discovered these two ways of running launchctl which will do what you want. For simpliciy I have not added your grep command.

To show system daemons/agents:

> sudo launchctl list

To show user daemons/agents:

> launchctl list

I like to use LaunchControl by soma-zone which allows me to control/change the agents and daemons as well as displaying them in 5 distinct lists:

  • User Agents
  • Global Agents
  • Global Daemons
  • System Agents
  • System Daemons