2

According to the Launchd Tutorial, there are two places where a daemon can be.

  1. A global daemon located at /Library/LaunchDaemons
  2. 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.

3

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:

  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System-wide daemons provided by the administrator.
  • /System/Library/LaunchAgents Per-user agents provided by OS X.
  • /System/Library/LaunchDaemons System-wide daemons provided by OS X.
0

System daemons are supplied by the vendor- Apple and global daemons are supplied by the administrator- YOU.

  • I know, but is there any difference in the way it functions? Does it work the same? Or is there a difference, like lets say an extra permission or something. – Andrew Jul 24 '18 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .