start mongo server code example
Example 1: start mongodb
sudo systemctl start mongod
Example 2: how to stop mongodb server in ubuntu
sudo systemctl stop mongodb
# it will stop running mongodb server
Example 3: mongodb start server
sudo systemctl start mongodb
Example 4: start mongod
mongod --dbpath <file_path> --port <port>