Line Comment in MongoDB config file 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.
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.