# mongosh

*noun*

say it: **“MONG-gohsh”** **/ˈmɑŋɡoʊʃ/**

The MongoDB Shell: a command-line program for connecting to MongoDB and running commands and queries by typing them.

## What does `mongosh` do?

`mongosh` is the MongoDB Shell, a command-line tool for connecting to a database and running queries in JavaScript.

```bash
mongosh "mongodb://localhost:27017/recipebox"

db.recipes.find({ minutes: { $lte: 20 } })
```

## In a sentence

- “**mongosh** runs JavaScript, so you can keep a query's answer in a variable.”
- “Ana typed db.recipes.find() into **mongosh** and saw her first recipes.”

Level: Novice · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=1)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/mongosh
