Search⌘ K
AI Features

Using MongoDB Shell

Explore how to interact directly with MongoDB using the MongoDB Shell. Learn to create, query, update, and delete databases and collections. Gain confidence in navigating the shell through essential commands and tips to manage your data efficiently.

What is the MongoDB Shell?

The MongoDB Shell (often called mongo or mongosh) is a command-line tool that allows us to interact directly with our MongoDB server. We can use it to:

  • Create and manage databases and collections.

  • Insert, query, update, and delete documents.

  • Run administrative commands. ...