Docs Menu
Docs Home
MongoDB Shell

Install mongosh

On this page

  • Prerequisites
  • Compatibility Considerations
  • Procedure
  • Next Steps

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.

You can use the MongoDB Shell to connect to MongoDB version 4.2 or greater.

You can install MongoDB Shell 2.0.0 on these operating systems:

Operating System
Supported Versions
11+ (x64 and ARM64)
Microsoft Windows

Microsoft Windows Server 2016+

Microsoft Windows 10+

Red Hat Enterprise Linux (RHEL) 8+ (x64, ARM64, ppc64le, and s390x)

Ubuntu 20.04+ (x64 and ARM64)
Amazon Linux 2023 (x64 and ARM64)
Amazon Linux 2 (x64 and ARM64)
Debian 11+
Oracle Linux 8+ running the Red Hat Compatible Kernel (RHCK). MongoDB Shell does not support the Unbreakable Enterprise Kernel (UEK).

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 with mongosh, install Node.js and then install mongosh through npm. The ability to run mongosh installed with npm and use Node.js 16 might be removed during the lifetime of mongosh 2.x.

Select the appropriate tab for your operating system:

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.

← Welcome to MongoDB Shell (mongosh)