mongodb service restart command code example
Example 1: mongo restart
sudo service mongod start
Example 2: mongodb restart command ubuntu
sudo systemctl restart mongod
sudo service mongod start
sudo systemctl restart mongod