why mongodb server is running code example
Example 1: how to restart mongodb server in ubuntu
sudo systemctl restart mongodb
# it will restarts running mongodb server
Example 2: how to stop mongodb server in ubuntu
sudo systemctl stop mongodb
# it will stop running mongodb server