sudo apt update && sudo apt install -y mongodb
// check status
sudo systemctl status mongodb
//start service
sudo systemctl start mongod
//stop service
sudo systemctl stop mongod
or service mongodb stop
sudo apt update && sudo apt install -y mongodb
// check status
sudo systemctl status mongodb
//start service
sudo systemctl start mongod
//stop service
sudo systemctl stop mongod
or service mongodb stop