
The most cleanest way to shutdown MongoDB is by executing the below commands,
> use admin
> db.shutdownServer();
Example:
> use admin
switched to db admin
> db.shutdownServer();
server should be down...
You can also stop MongoDB mongod service running on Ubuntu, run the command sudo service mongod stop
# sudo service mongod stop
or,
# sudo service mongodb stop
* Stopping database mongodb [OK]
You can also check the status of the server using the command,
# sudo service mongodb status
More Posts related to Ubuntu,
- Install Oh My Zsh on Ubuntu Docker complete steps
- Installing Home-brew on Ubuntu
- Install Golang (Go) on Ubuntu
- Install specific JRE on Ubuntu using apt
- How to stop/start/restart apache server using command [Ubuntu]
- How to install zsh shell on Ubuntu
- Quick steps to install Nginx on Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- Add new user in Ubuntu Linux using Terminal Command
- Fix Ubuntu /bin/sh: 1: zsh: not found error
- How to install Python on Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to stop MongoDB Server running on Ubuntu
- Install postgres Client using apt-get command
- How to kill service running on a port on Ubuntu Linux
- [fix] openssl No such file or directory error C++
- Fix - sudo: systemctl: command not found
- Access Windows share folder in Ubuntu Device in Network
- Add or remove users from sudo group - Ubuntu
- Quickly install Apache Server on Ubuntu Linux
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
More Posts:
- Java 8 Predicate Functional Interface Examples - Java
- Maven Eclipse (M2e) No archetypes currently available - Java
- Android Studio setup was canceled - How to resume - Android-Studio
- How to download Microsoft Visual Studio for M1/M2 Mac - MacOS
- Fix: Error: Cannot find module /node-examples/init - JavaScript
- How to retrieve all SharePoint Online List Items using Rest API - SharePoint
- Parse XML file in Java using DOM Parser - Java
- Fix: java.lang.UnsupportedOperationException Java Collections (List, Set, Map) - Java