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