Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

How to Install MongoDB Atlas CLI on Mac, Windows, and Linux: Complete Step-by-Step Tutorial

SEO Title: Install MongoDB Atlas CLI on macOS, Windows & Linux โ€“ Complete Guide

Meta Description: Learn how to install MongoDB Atlas CLI on macOS, Windows, Ubuntu, Debian, RHEL, and CentOS with step-by-step commands, login instructions, verification, updates, and troubleshooting.

Focus Keywords: install MongoDB Atlas CLI, MongoDB Atlas CLI macOS, MongoDB Atlas CLI Windows, install Atlas CLI Ubuntu, MongoDB Atlas CLI Linux, Atlas CLI commands, MongoDB CLI installation


1. Introduction

MongoDB Atlas is a fully managed cloud database platform that allows developers and organizations to deploy, operate, and scale MongoDB databases across major cloud providers.

Although MongoDB Atlas provides a web-based management console, developers, database administrators, DevOps engineers, and cloud engineers often need a faster and more automation-friendly way to manage database infrastructure.

This is where the MongoDB Atlas Command Line Interface (Atlas CLI) becomes useful.

The Atlas CLI allows you to interact with MongoDB Atlas directly from your terminal without repeatedly opening the MongoDB Atlas web console.

Using Atlas CLI, you can:

  • Manage MongoDB Atlas organizations and projects.
  • List and manage database clusters.
  • Manage database users and access controls.
  • Configure project-level network access.
  • Manage supported backup and database services.
  • Automate administrative tasks.
  • Integrate MongoDB Atlas operations into CI/CD pipelines.
  • Use named configuration profiles across environments.

In this tutorial, we will install MongoDB Atlas CLI on macOS, Windows, and Linux, authenticate with MongoDB Atlas, and execute essential commands.

2. What Is MongoDB Atlas CLI?

MongoDB Atlas CLI is MongoDB’s official command-line tool for interacting with MongoDB Atlas.

The CLI executable is named:

atlas

For example, you can check the installed version:

atlas --version

Authenticate with your MongoDB Atlas account:

atlas auth login

List accessible Atlas projects:

atlas projects listCode language: PHP (php)

List clusters in the selected project:

atlas clusters listCode language: PHP (php)

MongoDB Atlas CLI vs. MongoDB Shell

It is important to distinguish MongoDB Atlas CLI from MongoDB Shell (mongosh).

FeatureMongoDB Atlas CLIMongoDB Shell
Executableatlasmongosh
Primary purposeManage Atlas infrastructureQuery and modify database data
Manage Atlas projectsYesNo
Manage Atlas clustersYesNo
Execute MongoDB queriesNot its primary purposeYes
Database administrationAtlas resource administrationDatabase-level operations
CI/CD integrationYesYes

Important: Installing Atlas CLI does not install a MongoDB database server. Homebrew’s Atlas CLI package also installs mongosh, but other distribution methods may require MongoDB Shell to be installed separately.


3. System Requirements

Before installation, confirm that your operating system is supported.

Operating systemSupported versionsArchitecture
macOS12.0 or laterIntel x86-64, ARM64
WindowsWindows 10, 11x86-64
Windows Server2016, 2019x86-64
Ubuntu22.04, 24.04x86-64, ARM64
Debian12, 13x86-64, ARM64
RHEL / CentOS8, 9, 10x86-64, ARM64
Amazon Linux2023x86-64, ARM64
SUSE Linux Enterprise15x86-64, ARM64

Additional Prerequisites

You should have:

  • An active internet connection.
  • Terminal, Bash, Zsh, PowerShell, or Command Prompt access.
  • Appropriate permissions to install software.
  • A MongoDB Atlas account to manage cloud resources.
  • Access to the required MongoDB Atlas organizations and projects.

You can create a MongoDB Atlas account from:

https://www.mongodb.com/cloud/atlas/register

4. Install MongoDB Atlas CLI on macOS

MongoDB recommends using Homebrew to install Atlas CLI on macOS.

This method supports both Intel and Apple Silicon Macs.

Step 1: Open Terminal

Open Terminal from:

Applications โ†’ Utilities โ†’ Terminal

Alternatively, press Command + Space, search for Terminal, and open it.

Step 2: Check macOS Version

Run:

sw_vers

Example output:

ProductName:        macOS
ProductVersion:     26.6
BuildVersion:       ...Code language: HTTP (http)

The actual values depend on your Mac.

Check the processor architecture:

uname -m

Possible outputs:

arm64

This indicates Apple Silicon.

Or:

x86_64

This indicates an Intel architecture.

Both are supported.

Step 3: Check Whether Homebrew Is Installed

Run:

brew --version

If Homebrew is installed, the command displays its version.

If you receive:

zsh: command not found: brewCode language: HTTP (http)

Install Homebrew using the official installer:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Code language: JavaScript (javascript)

Review the installation instructions and complete the prompted steps.

On Apple Silicon, Homebrew commonly uses:

/opt/homebrew

On Intel Macs, the default prefix is commonly:

/usr/local

If brew remains unavailable, follow the shell configuration instructions displayed by the Homebrew installer.

Verify:

brew --version

Step 4: Update Homebrew

Run:

brew update

This refreshes Homebrew’s package metadata.

Step 5: Install MongoDB Atlas CLI

Execute:

brew install mongodb-atlas-cli

Homebrew downloads and installs the Atlas CLI package.

The package also installs MongoDB Shell (mongosh).

An alternative supported Homebrew package name is:

brew install mongodb-atlas

Use either package, not both.

Step 6: Verify MongoDB Atlas CLI Installation

Run:

atlas --version

Example output format:

atlascli version: 1.x.xCode language: CSS (css)

The exact output varies by release.

Display available commands:

atlas --help

Or:

atlas

If the CLI displays usage information and available commands, the installation is successful.

Step 7: Check the Atlas CLI Executable

Run:

which atlas

Or:

command -v atlas

The command returns the executable path.

For an Apple Silicon Homebrew installation, it may look like:

/opt/homebrew/bin/atlas

On an Intel Mac, it may be:

/usr/local/bin/atlas

Step 8: Verify MongoDB Shell (Optional)

Run:

mongosh --version

This confirms that MongoDB Shell is available.

MongoDB Atlas CLI is now installed on macOS.


5. Install MongoDB Atlas CLI on Windows 10/11

MongoDB provides official Windows installer packages in MSI and ZIP formats.

The MSI installer is generally the simplest option for Windows users.

Method 1: Install Using the Windows MSI Installer

Step 1: Check Windows Architecture

Open PowerShell.

Execute:

[System.Runtime.InteropServices.RuntimeInformation]::OSArchitectureCode language: CSS (css)

Expected result on a supported x64 system:

X64

Step 2: Download Atlas CLI for Windows

Visit the official MongoDB Atlas CLI installation page:

https://www.mongodb.com/docs/atlas/cli/current/install-atlas-cli

Or the official release page:

https://github.com/mongodb/mongodb-atlas-cli/releases/latest

Download the appropriate Windows x86-64 MSI installer.

Step 3: Run the MSI Installer

Locate the downloaded .msi file.

Double-click it and follow the installation wizard.

Accept the installation location and complete the installation.

Depending on your environment, administrator permissions may be required.

Step 4: Open a New PowerShell Terminal

After installation, open a new PowerShell window.

Execute:

atlas --version

Then:

atlas --help

If both commands work, the installation is complete.

Step 5: Verify the Executable Location

Run:

Get-Command atlas

Alternatively:

where.exe atlasCode language: CSS (css)

These commands help identify which executable Windows is using.

If Atlas CLI is not found, check the installation directory and configure your Windows PATH environment variable.

Method 2: Install Using the Windows ZIP Package

This method is useful if you prefer a portable installation or do not want to use MSI.

Step 1: Download the ZIP Package

Download the official Windows x86-64 ZIP archive from the latest release page.

For the commands below, rename the downloaded ZIP file to:

atlas-cli-windows.zipCode language: CSS (css)

Place it in your Downloads folder.

Step 2: Create an Installation Directory

Open PowerShell:

$installDir = Join-Path $HOME "Tools\AtlasCLI"

New-Item -ItemType Directory -Path $installDir -ForceCode language: PHP (php)

Step 3: Extract the Package

Run:

Expand-Archive `
  -Path "$HOME\Downloads\atlas-cli-windows.zip" `
  -DestinationPath $installDir `
  -ForceCode language: PHP (php)

Step 4: Locate atlas.exe

Execute:

Get-ChildItem -Path $installDir -Recurse -Filter atlas.exeCode language: PHP (php)

Identify the directory containing atlas.exe.

If the executable is in a nested folder, move it to the main installation directory:

$atlasExe = Get-ChildItem -Path $installDir -Recurse -Filter atlas.exe |
    Select-Object -First 1

if (-not $atlasExe) {
    throw "atlas.exe was not found in the extracted archive."
}

if ($atlasExe.DirectoryName -ne $installDir) {
    Copy-Item $atlasExe.FullName (Join-Path $installDir "atlas.exe") -Force
}Code language: PHP (php)

Step 5: Test the Executable

Run:

& "$installDir\atlas.exe" --versionCode language: JavaScript (javascript)

Step 6: Add Atlas CLI to the Windows PATH

Execute:

$userPath = [Environment]::GetEnvironmentVariable("Path", "User")

if (($userPath -split ";") -notcontains $installDir) {
    $newPath = ($userPath.TrimEnd(";") + ";" + $installDir).TrimStart(";")

    [Environment]::SetEnvironmentVariable(
        "Path",
        $newPath,
        "User"
    )
}Code language: PHP (php)

Update the current PowerShell session:

$env:Path += ";$installDir"Code language: PHP (php)

Step 7: Verify Installation

Run:

atlas --version

Then:

atlas --help

MongoDB Atlas CLI is now ready to use on Windows.


6. Install MongoDB Atlas CLI on Ubuntu Linux

MongoDB provides Debian packages and an official APT installation method.

The following repository example follows MongoDB’s documented Ubuntu 22.04 (jammy) repository configuration.

Method 1: Install Using APT on Ubuntu 22.04

Step 1: Check Ubuntu Version

Execute:

cat /etc/os-release

Check architecture:

uname -m

Possible values include:

x86_64

Or:

aarch64

Step 2: Update Package Metadata

sudo apt-get updateCode language: JavaScript (javascript)

Step 3: Install Dependencies

sudo apt-get install -y curl gnupg ca-certificatesCode language: JavaScript (javascript)

Step 4: Import MongoDB’s Repository Signing Key

Execute:

curl -fsSL https://pgp.mongodb.com/server-8.0.asc | \
  sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
  --dearmorCode language: JavaScript (javascript)

This imports the repository signing key into a dedicated keyring.

Step 5: Add the MongoDB Repository

Execute:

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] \
https://repo.mongodb.com/apt/ubuntu jammy/mongodb-enterprise/8.0 \
multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-8.0.listCode language: PHP (php)

Note: This repository command specifically uses Ubuntu jammy (22.04). Do not blindly reuse it on Ubuntu 24.04 or Debian. For those systems, use the direct package installation method below or the repository configuration documented for your distribution.

Step 6: Update APT

sudo apt-get updateCode language: JavaScript (javascript)

Step 7: Install MongoDB Atlas CLI

Execute:

sudo apt-get install -y mongodb-atlasCode language: JavaScript (javascript)

Notice the package name:

mongodb-atlas

This is the documented APT repository package name, whereas the Homebrew package is named mongodb-atlas-cli.

Step 8: Verify Installation

Run:

atlas --version

And:

atlas --help

Find the executable:

command -v atlas

Check the installed package:

dpkg -l mongodb-atlas

The installation is complete.

Method 2: Install Using a DEB File on Ubuntu or Debian

This approach is useful on supported Ubuntu and Debian versions when you do not want to configure an additional APT repository.

Step 1: Download the Package

Open:

https://github.com/mongodb/mongodb-atlas-cli/releases/latest

Download the Linux .deb file matching your architecture.

For example, release assets use names in this format:

mongodb-atlas-cli_1.59.3_linux_x86_64.debCode language: CSS (css)

For ARM64:

mongodb-atlas-cli_1.59.3_linux_arm64.debCode language: CSS (css)

These filenames refer to release 1.59.3. Use the equivalent filename for whichever version you download.

Step 2: Navigate to Downloads

cd ~/Downloads

Step 3: Install the Package

For an x86-64 package, using the filename above:

sudo apt install ./mongodb-atlas-cli_1.59.3_linux_x86_64.deb

For ARM64:

sudo apt install ./mongodb-atlas-cli_1.59.3_linux_arm64.deb

Use only the command corresponding to your downloaded file and architecture.

APT attempts to resolve dependencies using the configured repositories.

Step 4: Verify Installation

atlas --version
atlas --help

MongoDB Atlas CLI is now installed.


7. Install MongoDB Atlas CLI on RHEL and CentOS

MongoDB also supports RHEL and CentOS through RPM packages and YUM-compatible repositories.

Method 1: Install Using the MongoDB YUM Repository

Step 1: Check the Operating System

Execute:

cat /etc/os-release

Check processor architecture:

uname -m

Step 2: Create the MongoDB Repository Configuration

Run:

sudo tee /etc/yum.repos.d/mongodb-enterprise-8.0.repo <<EOF

[mongodb-enterprise-8.0]

name=MongoDB Enterprise Repository baseurl=https://repo.mongodb.com/yum/redhat/\$releasever/mongodb-enterprise/8.0/\$basearch/ gpgcheck=1 enabled=1 gpgkey=https://pgp.mongodb.com/server-8.0.asc EOF

This configures MongoDB’s documented Enterprise 8.0 RPM repository.

Step 3: Install MongoDB Atlas CLI

Execute:

sudo yum install -y mongodb-atlas

On modern RHEL-based systems, dnf is also commonly available:

sudo dnf install -y mongodb-atlas

Use the package manager supported by your distribution.

Step 4: Verify Installation

Run:

atlas --version

Check the package:

rpm -q mongodb-atlas

Display available commands:

atlas --help

Method 2: Install Directly from an RPM Package

Download the appropriate RPM package from:

https://github.com/mongodb/mongodb-atlas-cli/releases/latest

For example:

mongodb-atlas-cli_1.59.3_linux_x86_64.rpmCode language: CSS (css)

Navigate to the downloaded package directory:

cd ~/Downloads

Install:

sudo dnf install ./mongodb-atlas-cli_1.59.3_linux_x86_64.rpm

For ARM64, download the corresponding linux_arm64.rpm package instead.

Verify:

atlas --version

Amazon Linux: For Amazon Linux 2023, use a compatible RPM package or confirm the appropriate repository configuration for your platform before installation.


8. Alternative Linux Installation Using a TAR.GZ Archive

MongoDB also distributes standalone Linux binary archives.

This method is useful when you want to install the CLI without managing an RPM or Debian package.

Step 1: Download the Correct Archive

Visit:

https://github.com/mongodb/mongodb-atlas-cli/releases/latest

Download the Linux TAR.GZ archive corresponding to your processor architecture.

For example:

mongodb-atlas-cli_1.59.3_linux_x86_64.tar.gzCode language: CSS (css)

Step 2: Extract the Archive

Navigate to Downloads:

cd ~/Downloads

Extract:

tar -xzf mongodb-atlas-cli_1.59.3_linux_x86_64.tar.gzCode language: CSS (css)

Step 3: Locate the Executable

Run:

find . -type f -name atlas

The command locates an executable named atlas in the extracted files.

Step 4: Install the Binary

After finding the extracted executable, install it in a directory on your PATH.

For example, if the extracted binary is at ./bin/atlas:

sudo install -m 0755 ./bin/atlas /usr/local/bin/atlas

Adjust the source path if the extracted archive uses a different directory structure.

Step 5: Verify Installation

atlas --version

You can now invoke the Atlas CLI from any terminal directory.


9. Authenticate with MongoDB Atlas CLI

After installing the CLI, the next step is authenticating with MongoDB Atlas.

Step 1: Log In Using Your Atlas Account

Run:

atlas auth login

The CLI initiates an authentication workflow using your browser.

A one-time activation code is generated.

The code expires after approximately 10 minutes.

Complete the authentication process in the browser and return to the terminal.

Step 2: Verify Authentication

Execute:

atlas auth whoami

This command displays information about the currently authenticated identity.

Step 3: List MongoDB Atlas Projects

Run:

atlas projects listCode language: PHP (php)

The command lists projects accessible to the authenticated identity, subject to the required permissions.

For JSON-formatted output:

atlas projects list --output jsonCode language: PHP (php)

Step 4: List MongoDB Atlas Clusters

Execute:

atlas clusters listCode language: PHP (php)

To query a specific project without changing your default configuration:

atlas clusters list --projectId YOUR_PROJECT_IDCode language: PHP (php)

Replace YOUR_PROJECT_ID with your actual MongoDB Atlas project ID.

Step 5: View Cluster Details

Run:

atlas clusters describe YOUR_CLUSTER_NAME

Specify the project if necessary:

atlas clusters describe YOUR_CLUSTER_NAME \
  --projectId YOUR_PROJECT_ID

On PowerShell, keep the command on one line or use PowerShell’s backtick continuation syntax instead of Bash’s backslash.

Step 6: Log Out

atlas auth logout

This ends the CLI’s authenticated session.


10. Configure Atlas CLI Using API Keys

For CI/CD pipelines, Terraform workflows, infrastructure automation, or unattended scripts, interactive browser authentication is generally not appropriate.

MongoDB Atlas supports API key and service-account authentication.

Step 1: Create an Atlas API Key

In the MongoDB Atlas console, configure an appropriate organization or project API key with the required permissions.

Keep access scoped to the operations the automation needs.

Step 2: Initialize the CLI Configuration

Run:

atlas config init

The CLI prompts for the API credentials and configuration information.

Use the prompts rather than placing private credentials directly in command arguments.

Step 3: Verify the Configuration

Execute:

atlas config listCode language: PHP (php)

To inspect the default profile:

atlas config describe defaultCode language: JavaScript (javascript)

Sensitive API key values are redacted from the normal configuration description output.

Security recommendation: For automated environments, prefer MongoDB Atlas service accounts or appropriately scoped API keys, managed through a secure secrets platform. Avoid committing credentials or CLI configuration files containing secrets to Git.


11. Manage Multiple Atlas Environments with Profiles

When working with development, staging, and production environments, separate Atlas CLI profiles can help reduce mistakes.

Step 1: Configure a Development Profile

atlas auth login --profile development

Complete the authentication process.

Step 2: Configure a Production Profile

atlas auth login --profile production

Use the appropriate account and organization permissions.

Step 3: List Configured Profiles

atlas config listCode language: PHP (php)

Step 4: Run Commands with a Specific Profile

Development:

atlas clusters list --profile developmentCode language: PHP (php)

Production:

atlas clusters list --profile productionCode language: PHP (php)

Profiles can store default organization and project information.

Important: Profile names do not themselves enforce environment isolation. Permissions depend on the Atlas identity, organization roles, project roles, and credentials associated with each profile. Explicitly specifying --projectId is useful when running commands against sensitive resources.


12. Essential MongoDB Atlas CLI Commands

The following commands are useful immediately after installation.

TaskCommand
Check CLI versionatlas --version
Show helpatlas --help
Log inatlas auth login
Check authenticated identityatlas auth whoami
Log outatlas auth logout
List projectsatlas projects list
List clustersatlas clusters list
View cluster detailsatlas clusters describe CLUSTER_NAME
List profilesatlas config list
Configure API keys interactivelyatlas config init
View profile configurationatlas config describe default
View project JSONatlas projects list --output json
Show cluster helpatlas clusters --help
Show API command helpatlas api --help

Example: Validate Atlas CLI and Cluster Access

The following Bash script checks that the CLI is installed and confirms access to MongoDB Atlas:

#!/usr/bin/env bash

set -euo pipefail

echo "Checking MongoDB Atlas CLI..."

atlas --version

echo "Checking authentication..."

atlas auth whoami

echo "Listing available projects..."

atlas projects list

echo "Listing clusters in the selected project..."

atlas clusters list

echo "Validation completed successfully."Code language: PHP (php)

Save the file as:

check-atlas-cli.shCode language: CSS (css)

Make it executable:

chmod +x check-atlas-cli.shCode language: CSS (css)

Execute:

./check-atlas-cli.sh

This is a read-only validation example. It does not create, update, or delete cloud resources.


13. How to Update MongoDB Atlas CLI

Keeping the CLI updated helps maintain compatibility and provides access to bug fixes and new functionality.

macOS โ€” Homebrew

brew update
brew upgrade mongodb-atlas-cli

If you installed using the alternative Homebrew package:

brew upgrade mongodb-atlas

Verify:

atlas --version

Ubuntu/Debian โ€” APT Repository Installation

sudo apt-get update
sudo apt-get install --only-upgrade mongodb-atlasCode language: JavaScript (javascript)

This assumes you installed the mongodb-atlas package from a configured APT repository.

If you installed a downloaded DEB package instead, obtain the updated DEB file and install that version.

RHEL/CentOS โ€” YUM or DNF

sudo yum update mongodb-atlas

Or:

sudo dnf upgrade mongodb-atlas

Windows โ€” MSI

Download the latest supported MSI installer and run the installation.

For ZIP-based installations, download the updated ZIP and replace the old executable with the new one after verifying the package.

Always confirm:

atlas --version

14. Troubleshooting Common MongoDB Atlas CLI Errors

Error or issuePossible causeRecommended fix
atlas: command not foundCLI not installed or PATH missingVerify executable location and PATH
zsh: command not found: brewHomebrew missing or incorrectly configuredInstall/configure Homebrew
atlas is not recognizedWindows cannot locate executableAdd the CLI directory to PATH
Permission deniedExecutable permission problemVerify permissions and installation path
exec format errorIncorrect operating system or CPU architectureDownload the correct binary
401 UnauthorizedInvalid or expired authenticationReauthenticate and verify credentials
403 ForbiddenInsufficient Atlas permissionsReview organization/project roles and API access settings
TLS certificate errorCertificate trust or proxy issueCheck CA certificates and network configuration
APT repository errorIncorrect source, signing key, or distributionCheck the repository setup
Authentication timeoutNetwork, proxy, or browser authentication issueVerify connectivity and repeat login
No clusters returnedIncorrect project selection or insufficient accessCheck profile, project ID, and permissions

Troubleshooting 1: atlas Command Not Found on macOS

Run:

command -v atlas

Check the installed Homebrew package:

brew list mongodb-atlas-cliCode language: PHP (php)

Verify your shell PATH:

echo "$PATH"Code language: PHP (php)

If Homebrew is installed but unavailable in the shell, check the Homebrew environment configuration.

Troubleshooting 2: Atlas CLI Not Recognized on Windows

Run:

Get-Command atlas

Check PATH:

$env:PathCode language: PHP (php)

Confirm that the directory containing atlas.exe is present.

If you just updated PATH, close and reopen PowerShell.

Troubleshooting 3: MongoDB Atlas Authentication Failed

First verify local installation:

atlas --version

Try logging in again:

atlas auth login

Check your authentication state:

atlas auth whoami

If an API key is being used, verify its validity, scope, and applicable access-list requirements.

Troubleshooting 4: Cannot List MongoDB Atlas Clusters

Run:

atlas projects listCode language: PHP (php)

Then explicitly specify the target project:

atlas clusters list --projectId YOUR_PROJECT_IDCode language: PHP (php)

If the operation returns an authorization error, confirm the identity has sufficient project-level permissions.

Troubleshooting 5: Network or Proxy Problems

Organizations using corporate firewalls may require proxy configuration.

For Bash:

export HTTPS_PROXY="http://proxy.example.com:8080"Code language: JavaScript (javascript)

For Windows PowerShell:

$env:HTTPS_PROXY = "http://proxy.example.com:8080"Code language: PHP (php)

The proxy address is an illustrative placeholder. Replace it with your organization’s approved proxy settings.

For normal operations, use a trusted certificate chain rather than disabling TLS certificate verification.


15. How to Uninstall MongoDB Atlas CLI

macOS

If installed with Homebrew:

brew uninstall mongodb-atlas-cli

Or, if applicable:

brew uninstall mongodb-atlas

Ubuntu/Debian

For an installation from the MongoDB APT repository:

sudo apt remove mongodb-atlas

For a standalone DEB installation, determine its installed package name first:

dpkg -l | grep -i atlas

Then remove only the corresponding Atlas CLI package.

RHEL/CentOS

For the repository package:

sudo dnf remove mongodb-atlas

For direct RPM installations, first inspect:

rpm -qa | grep -i atlas

Remove the relevant installed package.

Windows

For MSI installations, use Windows Settings โ†’ Installed Apps to uninstall MongoDB Atlas CLI.

For portable ZIP installations, delete the installed executable and remove its directory from your PATH.

Configuration profiles may remain after uninstalling the executable. Delete them only if you intentionally want to remove local authentication and configuration information.


16. Frequently Asked Questions

Q1. Is MongoDB Atlas CLI free to install?

Yes. MongoDB Atlas CLI is freely available to download and install. However, cloud database infrastructure provisioned through Atlas may incur charges.

Q2. Do I need MongoDB Server installed to use Atlas CLI?

No. Atlas CLI communicates with MongoDB Atlas management services and does not require a local MongoDB database server.

Q3. Does MongoDB Atlas CLI work on Apple Silicon?

Yes. MongoDB Atlas CLI supports ARM-based Apple Silicon Macs.

Q4. Can I install MongoDB Atlas CLI on Windows 11?

Yes. Download the official Windows x86-64 MSI or ZIP package.

Q5. What is the difference between atlas and mongocli?

atlas is the dedicated MongoDB Atlas CLI. The older MongoDB CLI (mongocli) supported MongoDB Atlas, Cloud Manager, and Ops Manager.

MongoDB has deprecated mongocli atlas commands and recommends migrating Atlas operations to atlas.

Q6. Can I use MongoDB Atlas CLI with Terraform?

Yes, but the tools serve different purposes.

Terraform is typically used to define and manage MongoDB Atlas infrastructure declaratively through the MongoDB Atlas provider.

Atlas CLI is useful for interactive administrative operations, troubleshooting, inspection, and scripts.

For infrastructure managed by Terraform, avoid making untracked CLI changes that could create configuration drift.

Q7. Can I use MongoDB Atlas CLI in GitHub Actions or CI/CD?

Yes. Use appropriately scoped machine credentials or service accounts with secure secret management.

Avoid interactive login commands in unattended pipelines.

Q8. Is MongoDB Compass required?

No. MongoDB Compass is an optional graphical tool used to explore and work with MongoDB database data.

Atlas CLI works independently.


17. Best Practices for Production Environments

Follow these guidelines when using Atlas CLI in enterprise and production environments:

  1. Install Atlas CLI from official MongoDB sources.
  2. Verify downloaded packages and checksums before deploying to sensitive environments.
  3. Pin CLI versions in automated environments.
  4. Use separate, appropriately scoped credentials for development and production.
  5. Prefer service accounts or narrowly scoped API keys for CI/CD.
  6. Avoid storing credentials directly in scripts, repositories, or command history.
  7. Check the selected organization and project before performing modifications.
  8. Prefer read-only access for monitoring and inspection workflows.
  9. Use Terraform or another infrastructure-as-code solution for infrastructure that requires controlled declarative state.
  10. Review commands and their permissions before running them in production.

Production safety tip: The atlas setup command is useful for first-time onboarding, but it can create database resources, configure network access, and initialize a deployment. Do not run it against an established organization without understanding its effects.


18. MongoDB Atlas CLI Installation Cheat Sheet

Operating systemInstallation
macOS Intelbrew install mongodb-atlas-cli
macOS Apple Siliconbrew install mongodb-atlas-cli
Windows 10/11Official MSI or ZIP installer
Ubuntu 22.04Configure MongoDB APT repository, then sudo apt-get install mongodb-atlas
Ubuntu 24.04Official compatible DEB package
Debian 12/13Official compatible DEB package
RHEL/CentOSMongoDB YUM repository or RPM package
Amazon Linux 2023Compatible official RPM package
Other supported Linux systemsOfficial TAR.GZ binary
Verifyatlas --version
Authenticateatlas auth login
Check authenticationatlas auth whoami
List projectsatlas projects list
List clustersatlas clusters list

19. Conclusion

MongoDB Atlas CLI is an essential command-line tool for developers, database administrators, DevOps engineers, and platform teams managing MongoDB Atlas cloud infrastructure.

Installation is straightforward on the three major operating systems:

  • On macOS, Homebrew provides a convenient installation and update process.
  • On Windows, the official MSI installer is the easiest choice, while ZIP packages support portable installations.
  • On Linux, MongoDB offers APT repositories, YUM-compatible repositories, DEB packages, RPM packages, and standalone binary archives.

Once installed, start with the following commands:

atlas --version
atlas auth login
atlas auth whoami
atlas projects list
atlas clusters listCode language: PHP (php)

These commands confirm your installation, authenticate your Atlas account, and help you explore the cloud resources available to you.

With Atlas CLI configured, you can simplify day-to-day MongoDB Atlas administration, integrate management operations into automation workflows, and improve consistency across development, staging, and production environments.


Official References

Last reviewed: October 20, 2026. MongoDB Atlas CLI releases, supported operating systems, and installation requirements can change. Verify the current documentation before deploying in production.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

How to Configure pre-commit for Terraform: Complete DevOps Guide with 15 Practical Use Cases, Commands, Security Checks, and Best Practices

Terraform pre-commit Hooks: Installation, Configuration, TFLint, Trivy, Checkov & CI/CD Guide Learn to configure pre-commit for Terraform with step-by-step commands, terraform fmt, validate, TFLint, Trivy, Checkov, terraform-docs,…

Read More

How to Install and Configure pre-commit on macOS, Windows, and Linux: Complete Step-by-Step Guide

SEO Title: How to Install and Configure pre-commit on Mac, Windows & Linux (2026) Meta Description: Learn how to install and configure pre-commit Git hooks on macOS,…

Read More

How to Install Datadog CLI on macOS, Windows, and Linux: Complete Step-by-Step Guide

SEO Title: How to Install Datadog CLI on Mac, Windows & Linux โ€“ Complete 2026 Tutorial Meta Description: Learn how to install Datadog Pup CLI and Datadog…

Read More

How to Install GitHub CLI (gh) on macOS, Windows, and Linux: Complete Step-by-Step Guide

SEO Title: How to Install GitHub CLI (gh) on Mac, Windows & Linux โ€“ 2026 Guide Meta Description: Learn how to install GitHub CLI (gh) on macOS,…

Read More

How to Install Confluent CLI on macOS, Windows, and Linux: Complete Step-by-Step Guide

Meta Title: How to Install Confluent CLI on Mac, Windows & Linux (2026) Meta Description: Learn how to install and configure Confluent CLI on macOS, Windows, Ubuntu,…

Read More

From Side Hustle to Smart Business: A Practical Guide to Building, Growing, and Managing an Online Venture

Discover how entrepreneurs can combine digital marketing, global marketplaces, affordable technology, financial compliance, and modern operations to create sustainable businesses. Introduction: The New Age of Digital Entrepreneurship…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x