According to the Launchd Tutorial, there are two places where a daemon can be.
- A global daemon located at
/Library/LaunchDaemons
- A system daemon located at
/System/Library/LaunchDaemons
What is the difference between them? Both seem to do the same task, running a program at startup on behalf of root
.
EDIT:
By difference, I mean difference in function. I know that the system daemon comes from apple, and global from vendors, but I want to know if there is a difference in function.
Best Answer
No Difference
Once running, there is no difference between the locations. The origin of the launchd job determines the authorisation needed to manage the job.
Both
/Library
and/System
launchd jobs can run as any user. Per-user jobs are limited to their owner's user and group.Editing of the
/System
launchd jobs is restricted by System Integrity Protection.From
man 5 launchd.plist
: