Install mongosh

Prerequisites
To use the MongoDB Shell, you must have a MongoDB deployment to connect to.
For a free cloud-hosted deployment, you can use MongoDB Atlas.
To learn how to run a local MongoDB deployment, see Install MongoDB.
Supported MongoDB Versions
You can use the MongoDB Shell to connect to MongoDB version 4.2 or greater.
Supported Operating Systems
You can install MongoDB Shell 2.0.0 on these operating systems:
Operating System | Supported Versions |
---|---|
macOS | 11+ (x64 and ARM64) |
Microsoft Windows | Microsoft Windows Server 2016+ Microsoft Windows 10+ |
Linux | Red Hat Enterprise Linux (RHEL) 8+ (x64, ARM64, ppc64le, and s390x) Ubuntu 20.04+ (x64 and ARM64) Amazon Linux 2023 (x64 and ARM64) Debian 11+ SLES 15 |
Compatibility Considerations
Starting in mongosh
2.0.0:
Amazon Linux 1, Debian 9, and macOS 10.14 aren't supported.
Red Hat Enterprise Linux (RHEL) 7, Amazon Linux 2, SUSE Linux Enterprise Server (SLES) 12, and Ubuntu 18.04 support is deprecated and might be removed in a later
mongosh
release.If you must use
Node.js
16 withmongosh
, installNode.js
and then installmongosh
throughnpm
. The ability to runmongosh
installed withnpm
and useNode.js
16 might be removed during the lifetime ofmongosh
2.x.
Procedure
Select the appropriate tab for your operating system:
Next Steps
Once 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.