There's a command called
service in
/sbin. The manpage will tell you that it can list all available services on the system and using the
--test-if-configured-on option you can test whether a service is currently enabled or not.
So writing a simple one liner is a piece of cake:
for srv in $(service --list 2>&1); do service --test-if-configured-on ${srv} && echo ${srv}; done
Note: the
2>&1 redirection is needed, because
service --list prints its result to stderr (don't ask me why).
This will list all the services that are configured and enabled on your Mac.
If you need the list of disabled services, then just change the
&& with an
||:
for srv in $(service --list 2>&1); do service --test-if-configured-on ${srv} || echo ${srv}; done
Recent comments
3 days 1 min ago
3 days 19 min ago
5 days 5 hours ago
1 week 2 days ago
1 week 2 days ago
1 week 4 days ago
1 week 4 days ago
1 week 4 days ago
1 week 6 days ago
2 weeks 1 day ago