show dbs

Reference type:Cheat sheetFormat:Syntax + example + use case

Reference group: Database and collection discovery

What it does

mongosh helper listing databases visible to the current user.

Syntax

show dbs

Use case

Discover available development databases; empty databases may not appear.

show dbs: practical example
show dbs
💡 Explanation mongosh helper listing databases visible to the current user. When to use it Discover available development databases; empty databases may not appear.
Key Takeaways
  • mongosh helper listing databases visible to the current user.
  • Typical use: Discover available development databases; empty databases may not appear.