mongodb restart command code example
Example 1: mongo restart
sudo service mongod start
Example 2: how to restart mongodb server in ubuntu
sudo systemctl restart mongodb
# it will restarts running mongodb server
sudo service mongod start
sudo systemctl restart mongodb
# it will restarts running mongodb server