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.

1 Answer 1


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.

  • 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, 2014 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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