Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any /etc/init.d or service equivalent on Mac OS X Lion? I want to start/stop daemons, such as apache.

share|improve this question

migrated from Jul 2 '12 at 9:52

This question came from our site for professional and enthusiast programmers.

The OS X equivalent is launchd – Stefan Jul 2 '12 at 9:21
up vote 6 down vote accepted
man launchd

DESCRIPTION launchd manages processes, both for the system as a whole and for individual users. The pri- mary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to load and unload jobs. Where possible, it is preferable for jobs to launch on demand based on criteria specified in their respective con- figuration files.

During boot launchd is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.

You cannot invoke launchd directly.

share|improve this answer

You must log in to answer this question.

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