MongoDB 8 · Connecting and navigating
Check the server version
Print the version of the server you are connected to.
db.version()
Official MongoDB 8 documentation
More connecting and navigating commands
- Check the shell version
- Connect to a local server
- Connect to Atlas
- List databases
- Switch database
- List collections
All connecting and navigating commands · MongoDB 8 cheatsheet