Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

How to mark a line comment in mongodb configuration file?

cpu=true #temporary for dev env

Is this the right way?

There is no clue about it in their website page about setting the configuration options.

share|improve this question
up vote 0 down vote accepted

If you wish to mark the line a comment, then prepend the hash mark like so:

# cpu=true 

Any line beginning this way will be ignored completely.

Although it is not Windows (which I believe you are running), you can see examples in the Linux config file examples.

share|improve this answer
It's Windows & it works! Though i needed it for line comment after the config command like in the question itself. Anyway, thanks for the answer. – abhisekp Feb 5 '14 at 3:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.