stop mongodb server code example
Example 1: how to stop mongodb server in ubuntu
sudo systemctl stop mongodb
# it will stop running mongodb server
Example 2: exit mongodb
// In db shell
use adim
db.shutdownServer()
sudo systemctl stop mongodb
# it will stop running mongodb server
// In db shell
use adim
db.shutdownServer()