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