Why I don't see all launchctl daemons/agents with "sudo launchctl list"?
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
Here is a way to get all the system
and your daemons and agents managed by launchd
:
( /usr/bin/sudo launchctl list ; launchctl list )
Here is a way to get all but the Apple ones:
( /usr/bin/sudo launchctl list ; launchctl list ) |
grep -v 'com.apple.'
Note: to avoid to be trapped into using a fake sudo
command
(for example from a Trojan horse shell script) always use its full path:
/usr/bin/sudo
.