🌐
MongoDB
mongodb.com › try › download › shell
MongoDB Shell Download | MongoDB
The MongoDB Shell is a modern command-line experience, full with features to make it easier to work with your database. Free download. Try now!
🌐
MongoDB
mongodb.com › docs home › tools › mongodb shell
Install mongosh - mongosh - MongoDB Docs
MongoDB Shell · Copy page · Operating System · Select · After you successfully install mongosh, learn how to connect to your MongoDB deployment. MongoDB provides a programmatically accessible list of mongosh downloads that can be accessed through your application.
Discussions

MongoDB Command Line Installation
But he is able to download MongoDB using Home Brew. How do I download the command line for MongoDB? I am following a video course where the instructor is using a MAC while I am using a PC. He has used Homebrew to install the Mongo Shell Command. But Homebrew is just for a MAC. More on forums.percona.com
🌐 forums.percona.com
0
November 21, 2023
Where should I put the MongoDB Shell?
I'm not clear on your use case. I would Just run the MongoDB shell from a Docker container, or install it with the Scoop package manager for Windows. Using Scoop will help you keep the package up-to-date as new versions are released. https://scoop.sh scoop install mongodb More on reddit.com
🌐 r/mongodb
2
2
November 24, 2022
URL to always download the latest version of mongosh
I’m looking to automate always installing the latest available version of mongosh in a CI pipeline. I get that I can go to the downloads page here, pick the version, and the platform, and click “copy link”. That will give me a URL like this: https://downloads.mongodb.com/compass/mong... More on mongodb.com
🌐 mongodb.com
0
February 5, 2023
Cant open up Mongo Shell
Because you downloaded from https://www.mongodb.com/try/download/database-tools [ MongoDB Shell Download ] file that doesn't have mongosh. You need to download [ MongoDB Shell Download ] file from same site to have it, and then you can put it to system variable. Worked for me :D More on reddit.com
🌐 r/mongodb
11
1
June 15, 2022
People also ask

How to check MongoDB shell version?
To check the MongoDB shell version, open the MongoDB shell and type the following command:
db.version()
This will display the version of MongoDB you're currently using.
🌐
hevodata.com
hevodata.com › home › learn › database management system
How to Install Windows MongoDB Shell: Step-by-Step Explained
How to use MongoDB shell on Windows?
To use the MongoDB shell on Windows, follow these steps:
1. Install MongoDB on your Windows system.
2. Open Command Prompt or PowerShell.
3. Navigate to the MongoDB installation directory or add it to your system's PATH.
4. Type mongo to start the MongoDB shell and connect to your local MongoDB instance.
🌐
hevodata.com
hevodata.com › home › learn › database management system
How to Install Windows MongoDB Shell: Step-by-Step Explained
🌐
MongoDB
mongodb.com › products › tools › shell
MongoDB Shell: Manage and interact with your database | MongoDB
For easy distribution and reuse, you can also package your scripts as snippets. ... Download MongoDB Shell (mongosh) as a standalone tool to run in your terminal, or access it directly within Compass, MongoDB's official GUI.
🌐
MongoDB
mongodb.com › try › download › community
Download MongoDB Community Server | MongoDB
Download MongoDB Community Server non-relational database to take your next big project to a higher level!
🌐
GitHub
github.com › mongodb-js › mongosh
GitHub - mongodb-js/mongosh: The MongoDB Shell
MongoDB Shell works with MongoDB servers >= 4.0. You can get the release tarball from our Downloads Page. We currently maintain MongoDB Shell on three different platforms - Windows (zip), MacOS (zip) and Linux (tgz, deb and rpm).
Starred by 377 users
Forked by 82 users
Languages   TypeScript 91.1% | JavaScript 3.6% | Kotlin 3.6% | Shell 1.3%
🌐
MongoDB
mongodb.com › docs › mongodb-shell
Welcome to MongoDB Shell (mongosh) - mongosh - MongoDB Docs
The MongoDB Shell, mongosh, is a JavaScript and Node.js REPL environment for interacting with MongoDB deployments in Atlas , locally, or on another remote host. Use the MongoDB Shell to test queries and interact with the data in your MongoDB database. Download mongosh ·
Find elsewhere
🌐
Bytebase
bytebase.com › reference › mongodb › how-to › how-to-install-mongodb-shell-on-mac-ubuntu-centos-windows
How to install Mongo Shell (mongosh) on Mac, Ubuntu, CentOS, Windows
# For CentOS 8+ sudo dnf install -y mongodb-mongosh # For CentOS 7 sudo yum install -y mongodb-mongosh ... # For CentOS 8+ wget https://downloads.mongodb.com/compass/mongodb-mongosh-2.1.1.el8.x86_64.rpm # For CentOS 7 wget https://downloads...
🌐
MongoDB
mongodb.com › try › download › community-edition › releases
MongoDB Community Downloads | MongoDB
Mongos Package: mongodb-org-mongos-5.0.32-1.amzn2.aarch64.rpm · Mongo Shell Package: mongodb-org-shell-5.0.32-1.amzn2.aarch64.rpm · Amazon Linux 2 x64 · Archive: mongodb-linux-x86_64-amazon2-5.0.32.tgz · Server Package: mongodb-org-server-5.0.32-1.amzn2.x86_64.rpm ·
🌐
Hevo
hevodata.com › home › learn › database management system
How to Install Windows MongoDB Shell: Step-by-Step Explained
April 17, 2025 - To begin the Windows MongoDB Shell Install process, go to the download page at https://www.mongodb.com/try/download/shell.
🌐
Percona Community
forums.percona.com › mongodb
MongoDB Command Line Installation - MongoDB - Percona Community Forum
November 21, 2023 - I am working on a full stack system. The instruction I am following uses a MAC but I am using a PC. The instructor is using Home Brew which is only for a MAC. But he is able to download MongoDB using Home Brew. How d…
🌐
Microsoft
winget.run › pkg › MongoDB › Shell
Download and install MongoDB Shell with winget
The mongo shell is an interactive JavaScript interface to MongoDB. You can use the mongo shell to query and update data as well as perform administrative operations.
🌐
MongoDB
mongodb.com › products › self-managed › community-edition
MongoDB Community Edition | MongoDB
Download and install Community Edition on Windows, macOS, or Linux to run a MongoDB database today.Download Community Server · Use MongoDB Shell to perform CRUD operations and build aggregation pipelines.
🌐
Chocolatey
community.chocolatey.org › packages › mongodb-shell
Chocolatey Software | MongoDB Shell 2.5.10
The application has been downloaded from the official distribution and can be verified by: 1. Go to the binary distribution page https://github.com/mongodb-js/mongosh/releases and download the archive mongosh-2.5.10-win32-x64.zip using the links ...
🌐
GeeksforGeeks
geeksforgeeks.org › mongodb › how-to-install-mongodb-on-windows
How to Install MongoDB on Windows? - GeeksforGeeks
September 18, 2025 - To install MongoDB on Windows, first, download the MongoDB server and then install the MongoDB shell.
Top answer
1 of 2
38

IMPORTANT: The legacy mongo shell was deprecated in the MongoDB 5.0 release and removed in the 6.0 release packages. The modern replacement is the MongoDB Shell (mongosh) which is a more fully featured JavaScript and Node.js REPL environment that is also compatible with a broader range of MongoDB server versions. For example, as of Feb 2024 mongosh was supporting MongoDB Server v4.2 and greater.

(original answer from March 2019 below)

If you just want the mongo shell, you could install the mongodb-clients package mentioned in your question. However, note that this includes an older shell version (3.6.3).

The official MongoDB packages are updated with each minor release and you should ideally install a shell version matching your MongoDB server's major version (3.6, 4.0). Significant mismatches in shell versus server versions can result in some subtle errors as well as missing or outdated helpers. For example, the MongoDB 3.6.x shell doesn't have helpers for transactions (which were added in 4.0).

The MongoDB documentation includes information on Installing the official packages on Ubuntu. There is a mongodb-org-shell package which only includes the MongoDB shell, and you may also want to install mongodb-org-tools for other command-line tools (mongodump, mongorestore, ...).

It would be best to follow the instructions in the MongoDB documentation as some details may change in future (such as the signing key), but the general steps to follow for MongoDB 4.0 on Ubuntu 18.04 (Bionic) are:

  1. Import the public key used to sign packages from MongoDB, Inc

     sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
    
  2. Create a package list file for MongoDB

     echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    
  3. Update your local package database

     sudo apt-get update
    
  4. Install the desired MongoDB package(s)

     sudo apt-get install -y mongodb-org-shell
    

NOTE: The legacy mongo shell was deprecated in the MongoDB 5.0 release and removed in the 6.0 release packages. The modern replacement is the MongoDB Shell (mongosh) which is a more fully feastured JavaScript and Node.js REPL environment.

2 of 2
5

You might want to install mongosh (MongoDB Shell) instead. The legacy mongo shell has been deprecated since MongoDB v5.0 and replaced by mongosh. From the official website:

The new MongoDB Shell, mongosh, offers numerous advantages over the legacy mongo shell, such as:

  • Improved syntax highlighting.
  • Improved command history.
  • Improved logging.

Currently mongosh supports a subset of the mongo shell methods. Achieving feature parity between mongosh and the mongo shell is an ongoing effort.

To maintain backwards compatibility, the methods that mongosh supports use the same syntax as the corresponding methods in the mongo shell. To see the complete list of methods supported by mongosh, see MongoDB Shell Methods.

Further reference: Compatibility Changes with Legacy mongo Shell

🌐
Linode
linode.com › docs › guides › mongodb-community-shell-installation
Install and Use the MongoDB Community Shell | Linode Docs
December 10, 2021 - You must have access to your MongoDB server instance and the necessary credentials to connect to your database. The steps in this section work on macOS 13.0 and above. Download the MongoDB Shell for macOS 11+ from the MongoDB website.
🌐
MongoDB
mongodb.com › try › download › enterprise
MongoDB Enterprise Server Download | MongoDB
Download MongoDB Enterprise Server non-relational database with advanced security and performance options for the most demanding apps!
🌐
Studio 3T
studio3t.com › download
Download Studio 3T for MongoDB | Windows, macOS & Linux
June 2, 2025 - No knowledge of MongoDB query syntax required. ... Not only can you add, edit, and move aggregation stages but also define operators and check inputs and outputs at each pipeline stage. This makes debugging easier and ensures that your query is accurate each step of the way. ... Save time with this built-in mongo shell ...
🌐
MongoDB
mongodb.com › working with data › developer tools
URL to always download the latest version of mongosh - Developer Tools - MongoDB Developer Community Forums
February 5, 2023 - I’m looking to automate always installing the latest available version of mongosh in a CI pipeline. I get that I can go to the downloads page here, pick the version, and the platform, and click “copy link”. That will give me a URL like this: https://downloads.mongodb.com/compass/mong...