title: What is the correct way to start a mongod service on linux / OS X?
body: <p>I've installed mongodb and have been able to run it, work with it, do simple DB read / write type stuff.  Now I'm trying to set up my Mac to run mongod as a service.</p>
  
  <p>I get "Command not found" in response to: </p>
  
  <pre><code> init mongod start
  </code></pre>
  
  <p>In response to: </p>
  
  <pre><code>~: service mongod start
  service: This command still works, but it is deprecated. Please use launchctl(8) instead.
  service: failed to start the 'mongod' service
  </code></pre>
  
  <p>And if I try:</p>
  
  <pre><code>~: launchctl start mongod
  launchctl start error: No such process
  </code></pre>
  
  <p>So obviously I'm blundering around a bit. Next step seems to be typing in random characters until something works. The command which <em>does</em> work is: <code>mongod --quiet &amp;</code> I'm not sure, maybe that is the way you're supposed to do it?  Maybe I should just take off 'quiet mode' and add <code>&gt; /logs/mongo.log</code> to the end of the command line?</p>
  
  <p>I'm building a development environment on a Mac with the intention of doing the same thing on a linux server.  I'm just not sure of the Bash commands.  All the other searches I do with trying to pull up the answer give me advice for windows machines.  </p>
  
  <p>Perhaps someone knows the linux version of the commands?</p>
  
  <p>Thanks very much</p>