![Stop MongoDB Server Ubuntu Stop MongoDB Server Ubuntu](https://code2care.org/q/stop-mongodb-server-on-ubuntu/images/Stop MongoDB Server Ubuntu.png)
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,
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts:
- How to delete a dir or folder using Python code - Python
- How to Know Version of Windows Terminal - Windows
- Notepad++ is about to exit prompt message - NotepadPlusPlus
- How to check installed Tomcat version - Tomcat
- [Fix] Minecraft Error: A JNI error has occurred, please check your installation and try again - HowTos
- How to Install Git Bash on Windows 11 using Terminal Command - Windows-11
- incorrect line ending: found carriage return (\r) without corresponding newline (\n) - Android
- Open Docker Desktop from macOS Terminal - Docker