MongoDB Shell and Connection Basics
Connect with mongosh, switch databases, inspect collections, and run the most common shell workflows.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Collection bootstrap
More in MongoDB
MongoDB Transactions and Change Streams
Use sessions, multi-document transactions, and change streams for modern event-driven and consistency-sensitive MongoDB applications.
MongoDB Backup, Restore, and Replica Set Workflows
Use mongodump, mongorestore, replica set commands, and diagnostic tools for operational MongoDB workflows.
MongoDB Import, Export, and Database Tools
Use mongoimport, mongoexport, bsondump, and GridFS tools for practical MongoDB data movement workflows.
MongoDB Users, Roles, and Administrative Commands
Create users, grant roles, inspect server status, and run the most common administrative commands in MongoDB.
MongoDB Indexes, Explain Plans, and Performance
Create indexes, inspect query plans, and troubleshoot common MongoDB query performance issues.
MongoDB Aggregation Pipeline Patterns
Group, project, sort, unwind, lookup, facet, and aggregate analytics data with MongoDB pipelines.