Docs Menu
Docs Home
/
MongoDB Database Tools
/

Installing the Database Tools on Linux

On this page

  • Overview
  • Compatibility
  • Installation

The MongoDB Database Tools are a suite of command-line utilities for working with MongoDB. Use this guide to install the Database Tools on the Linux platform.

You can use the MongoDB Database Tools to migrate from a self-hosted deployment to MongoDB Atlas. MongoDB Atlas is the fully managed service for MongoDB deployments in the cloud. To learn more, see Seed with mongorestore.

To learn all the ways you can migrate to MongoDB Atlas, see Migrate or Import Data.

Starting with MongoDB 4.4, the MongoDB Database Tools are now released separately from the MongoDB Server and use their own versioning, with an initial version of 100.0.0. Previously, these tools were released alongside the MongoDB Server and used matching versioning.

For documentation on the MongoDB 4.2 or earlier versions of these tools, reference the MongoDB Server Documentation for that version of the tool:

Note

Quick links to older documentation

MongoDB Database Tools version 100.10.0 supports the following versions of the MongoDB server:

  • MongoDB 8.0

  • MongoDB 7.0

  • MongoDB 6.0

  • MongoDB 5.0

  • MongoDB 4.4

  • MongoDB 4.2

While the tools may work on earlier versions of MongoDB server, any such compatibility is not guaranteed.

The MongoDB Database Tools version 100.10.0 are supported on the following platforms on the x86_64 architecture:

  • Amazon Linux 2 and 2013.03+

  • Debian 10 and 9

  • RHEL / CentOS 8, 7, and 6

  • SUSE 12

  • Ubuntu 20.04, 18.04, and 16.04

In addition, the Database Tools also support select Linux platforms on the arm64, ppc64le, and s390x architectures. See Supported Platforms for more information.

Note

Starting in version 100.9.5, database tools no longer supports the Debian 8 operating system.

The MongoDB Database Tools can be installed with your Linux distribution's package manger or downloaded as a .tgz archive. Select the appropriate tab based on your Linux distribution and desired package from the tabs below:

  • To install the .deb package on Ubuntu and Debian, click the DEB Package tab.

  • To install the .rpm package on RHEL / CentOS / SUSE, click the RPM Package tab.

  • To install the .tgz tarball, click the TGZ Archive tab.

Note

If you have already installed the MongoDB Server via your system's package manager, you likely already have the Database Tools installed. The following command will determine if the Database Tools are already installed on your system:

sudo dpkg -l mongodb-database-tools
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture

  2. Select the deb Package

  3. Click the Download button

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .deb directly on your Linux system.

2

Navigate to the directory containing the downloaded .deb package, then run the following command to install the Database Tools using the apt package manager:

sudo apt install ./mongodb-database-tools-*-100.10.0.deb

Note

Be sure to include the leading ./ in the command above, which instructs apt to look for this file in the local directory instead of searching remote repositories.

3

Once installed, you can run any of the Database Tools directly from your system's command line. Consult the reference page for the specific tool you wish to use for its full syntax and usage.

Note

If you have already installed the MongoDB Server via your system's package manager, you likely already have the Database Tools installed. The following command will determine if the Database Tools are already installed on your system:

sudo yum list installed mongodb-database-tools
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture

  2. Select the rpm Package

  3. Click the Download button

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .rpm directly on your Linux system.

2

Navigate to the directory containing the downloaded .rpm package, then run the following command to install the Database Tools using the yum package manager:

sudo yum install -y mongodb-database-tools-*-100.10.0.rpm
3

Once installed, you can run any of the Database Tools directly from your system's command line. Consult the reference page for the specific tool you wish to use for its full syntax and usage.

1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture

  2. Select the tgz Package

  3. Click the Download button

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .tgz directly on your Linux system.

2

Run the following command from the directory containing the downloaded .tgz package:

tar -zxvf mongodb-database-tools-*-100.10.0.tgz
3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command line by name, without needing to specify its full path, or first navigating to its parent directory.

You can either:

  • Copy the DB Tools binaries from the extracted directory into a directory already listed in your PATH, such as /usr/local/bin. Navigate into the extracted directory, then run the following command to copy the binaries:

    sudo cp * /usr/local/bin/
  • Add the DB Tools installation directory to your PATH, by editing your shell's configuration file. For example, in bash, you would edit the ~/.bash_profile file.

4

Once installed, you can run any of the Database Tools directly from your system's command line. Consult the reference page for the specific tool you wish to use for its full syntax and usage.

Back

Installation