Installing the Database Tools on Linux¶
Overview¶
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.
Versioning¶
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:
Compatibility¶
MongoDB Server Compatibility¶
MongoDB Database Tools version 100.3.1
supports the following versions
of the MongoDB server:
- MongoDB 4.4
- MongoDB 4.2
- MongoDB 4.0
- MongoDB 3.6
While the tools may work on earlier versions of MongoDB server, any such compatibility is not guaranteed.
Platform Support¶
The MongoDB Database Tools version 100.3.1
are supported on the following
platforms on the x86_64
architecture:
- Amazon Linux 2 and 2013.03+
- Debian 10, 9, and 8
- RHEL / CentOS 8, 7, and 6
- SUSE 12
- Ubuntu 20.04, 18.04, 16.04, and 14.04
In addition, the Database Tools also support select Linux platforms
on the arm64
, ppc64le
, and s390x
architectures. See
Supported Platforms for more
information.
Installation¶
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 theDEB Package
tab. - To install the
.rpm
package on RHEL / CentOS / SUSE, click theRPM Package
tab. - To install the
.tgz
tarball, click theTGZ Archive
tab.
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
Download the Database Tools .deb
package.¶
Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:
- Select your Linux Platform and Architecture
- Select the
deb
Package - 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.
Install the downloaded package.¶
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.3.1.deb
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.
Run the installed Tools.¶
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.