Products
Platform
Atlas
Build on a developer data platform
Platform Services
Database
Deploy a multi-cloud database
Search
Deliver engaging search experiences
Vector Search
Design intelligent apps with gen AI
Stream Processing
Unify data in motion and data at rest
Self Managed
Enterprise Advanced
Run and manage MongoDB yourself
Community Edition
Develop locally with MongoDB
Tools
Compass
Work with MongoDB data in a GUI
Integrations
Integrations with third-party services
Relational Migrator
Migrate to MongoDB with confidence
View All Products
Explore our full developer suite
arrow-right
Build with MongoDB Atlas
Get started for free in minutes
Sign Up
Test Enterprise Advanced
Develop with MongoDB on-premises
Download
Try Community Edition
Explore the latest version of MongoDB
Download
Resources
Documentation
Atlas Documentation
Get started using Atlas
Server Documentation
Learn to use MongoDB
Start With Guides
Get step-by-step guidance for key tasks
Tools and Connectors
Learn how to connect to MongoDB
MongoDB Drivers
Use drivers and libraries for MongoDB
Resources Hub
Get help building the next big thing with MongoDB
arrow-right
Connect
Developer Center
Explore a wide range of developer resources
Community
Join a global community of developers
Courses and Certification
Learn for free from MongoDB
Events and Webinars
Find an event or webinar near you
Solutions
Use cases
Artificial Intelligence
Edge Computing
Internet of Things
Mobile
Payments
Serverless Development
Industries
Financial Services
Telecommunications
Healthcare
Retail
Public Sector
Manufacturing
Solutions Library
Organized and tailored solutions to kick-start projects
arrow-right
Developer Data Platform
Accelerate innovation at scale
Learn more
arrow-right
Startups and AI Innovators
For world-changing ideas and AI pioneers
Learn more
arrow-right
Customer Case Studies
Hear directly from our users
See Stories
arrow-right
Company
Careers
Start your next adventure
Blog
Read articles and announcements
Newsroom
Read press releases and news stories
Partners
Learn about our partner ecosystem
Leadership
Meet our executive team
Company
Learn more about who we are
Contact Us
Reach out to MongoDB
Let’s chat
arrow-right
Investors
Visit our investor portal
Learn more
arrow-right
Pricing
Eng
Support
Sign In
Try Free
menu-vertical
Products
Platform
Atlas
Build on a developer data platform
Platform Services
Database
Deploy a multi-cloud database
Search
Deliver engaging search experiences
Vector Search
Design intelligent apps with gen AI
Stream Processing
Unify data in motion and data at rest
Self Managed
Enterprise Advanced
Run and manage MongoDB yourself
Community Edition
Develop locally with MongoDB
Tools
Compass
Work with MongoDB data in a GUI
Integrations
Integrations with third-party services
Relational Migrator
Migrate to MongoDB with confidence
View All Products
Explore our full developer suite
arrow-right
Build with MongoDB Atlas
Get started for free in minutes
Sign Up
Test Enterprise Advanced
Develop with MongoDB on-premises
Download
Try Community Edition
Explore the latest version of MongoDB
Download
Resources
Documentation
Atlas Documentation
Get started using Atlas
Server Documentation
Learn to use MongoDB
Start With Guides
Get step-by-step guidance for key tasks
Tools and Connectors
Learn how to connect to MongoDB
MongoDB Drivers
Use drivers and libraries for MongoDB
Resources Hub
Get help building the next big thing with MongoDB
arrow-right
Connect
Developer Center
Explore a wide range of developer resources
Community
Join a global community of developers
Courses and Certification
Learn for free from MongoDB
Events and Webinars
Find an event or webinar near you
Solutions
Use cases
Artificial Intelligence
Edge Computing
Internet of Things
Mobile
Payments
Serverless Development
Industries
Financial Services
Telecommunications
Healthcare
Retail
Public Sector
Manufacturing
Solutions Library
Organized and tailored solutions to kick-start projects
arrow-right
Developer Data Platform
Accelerate innovation at scale
Learn more
arrow-right
Startups and AI Innovators
For world-changing ideas and AI pioneers
Learn more
arrow-right
Customer Case Studies
Hear directly from our users
See Stories
arrow-right
Company
Careers
Start your next adventure
Blog
Read articles and announcements
Newsroom
Read press releases and news stories
Partners
Learn about our partner ecosystem
Leadership
Meet our executive team
Company
Learn more about who we are
Contact Us
Reach out to MongoDB
Let’s chat
arrow-right
Investors
Visit our investor portal
Learn more
arrow-right
Pricing
Eng
Support
Sign In
Try Free
menu-vertical
Docs Home
MongoDB Manual
8.0 (current)
Introduction
CRUD Operations
Aggregation Operations
Indexes
Atlas Search
Atlas Vector Search
Time Series
Change Streams
Transactions
Data Modeling
Replication
Sharding
Storage
Administration
Security
Self-Managed Deployments
FAQ
Reference
Collation
Connection Strings
Database Commands
Default Port
Read & Write Concerns
Error Codes
Glossary
Log Messages
Limits & Thresholds
MongoDB Database Tools
Wire Protocol
mongosh Methods
Native Methods
Atlas Search Index
Atlas Stream Processing
Collections
Cursors
Databases
db.adminCommand
db.aggregate
db.commandHelp
db.createCollection
db.createView
db.currentOp
db.dropDatabase
db.fsyncLock
db.fsyncUnlock
db.getCollection
db.getCollectionInfos
db.getCollectionNames
db.getLogComponents
db.getMongo
db.getName
db.getProfilingStatus
db.getReplicationInfo
db.getSiblingDB
db.hello
db.help
db.hostInfo
db.killOp
db.listCommands
db.logout
db.printCollectionStats
db.printReplicationInfo
db.printSecondaryReplicationInfo
db.printShardingStatus
db.printSlaveReplicationInfo
db.resetError
db.rotateCertificates
db.runCommand
db.serverBuildInfo
db.serverCmdLineOpts
db.serverStatus
db.setLogLevel
db.setProfilingLevel
db.shutdownServer
db.stats
db.version
db.watch
Query Plan Caches
Bulk Operations
User Management
Role Management
Replication
Sharding
Object Constructors
Connections
Client-Side Field Level Encryption
Operators
Server Sessions
Slot-Based Query Execution Engine
Stable API
System Collections
Legacy mongo Shell
Release Notes
Technical Support
Docs Menu
Rate This Page
Docs Home
/
MongoDB Manual
/
Reference
/
mongosh Methods
/
Databases
db.help()
db.help()
Returns:
Text output listing common methods on the
db
object.
Back
db.hello
Next
db.hostInfo