I need to be able to start/stop MongoDB on the CLI. It is quite simple to start:
But to stop mongo DB, I need to run open mongo shell first and then type two commands:
So I don't know how to stop mongo DB in one line. Any help?