Error parsing command line : unrecognized option '--rest' Error parsing command line : unrecognized option '--rest' mongodb mongodb

Error parsing command line : unrecognized option '--rest'


The --rest parameter was removed in MongoDB 3.6 as described in this page: MongoDB Configuration Hardening and this ticket: SERVER-29000.

Remove the --rest option from your command line.


Just Install MongoDb and go to the bin folder and run mongo using cmd to start the server. By default, data will be stored to c:\data\db (create a folder).

Also if you have gitbash installed you can set aliases to run using gitbash.

Run following command:

cd~touch .bash_profilevi .bash_profile

now it will open vim editor press i and type:

alias mongod="/c/Program\ files/MongoDB/Server/{version}/bin/mongod.exe"alias mongo="/c/Program\ Files/MongoDB/Server/{version}/bin/mongo.exe"

remember to replace {version} with your installed version.

Press esc and type :wq! and press enter to exit.

Now you can run mongo and mongod commands from any directory on gitbash.


I removed the --rest parameter but it doesn't work. After I run "net start MongoDB", it gaves me this message:"The service is not responding to the control function.

More help is available by typing NET HELPMSG 2186"