{"id":79422,"date":"2026-10-20T04:29:51","date_gmt":"2026-10-20T04:29:51","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=79422"},"modified":"2026-10-20T04:29:56","modified_gmt":"2026-10-20T04:29:56","slug":"how-to-install-mongodb-atlas-cli-on-mac-windows-and-linux-complete-step-by-step-tutorial","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-install-mongodb-atlas-cli-on-mac-windows-and-linux-complete-step-by-step-tutorial\/","title":{"rendered":"How to Install MongoDB Atlas CLI on Mac, Windows, and Linux: Complete Step-by-Step Tutorial"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>SEO Title:<\/strong> Install MongoDB Atlas CLI on macOS, Windows &amp; Linux \u2013 Complete Guide<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Meta Description:<\/strong> 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Focus Keywords:<\/strong> 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<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where the <strong>MongoDB Atlas Command Line Interface (Atlas CLI)<\/strong> becomes useful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Atlas CLI allows you to interact with MongoDB Atlas directly from your terminal without repeatedly opening the MongoDB Atlas web console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using Atlas CLI, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Manage MongoDB Atlas organizations and projects.<\/li>\n\n\n\n<li>List and manage database clusters.<\/li>\n\n\n\n<li>Manage database users and access controls.<\/li>\n\n\n\n<li>Configure project-level network access.<\/li>\n\n\n\n<li>Manage supported backup and database services.<\/li>\n\n\n\n<li>Automate administrative tasks.<\/li>\n\n\n\n<li>Integrate MongoDB Atlas operations into CI\/CD pipelines.<\/li>\n\n\n\n<li>Use named configuration profiles across environments.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we will install MongoDB Atlas CLI on macOS, Windows, and Linux, authenticate with MongoDB Atlas, and execute essential commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. What Is MongoDB Atlas CLI?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB Atlas CLI is MongoDB&#8217;s official command-line tool for interacting with MongoDB Atlas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The CLI executable is named:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For example, you can check the installed version:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Authenticate with your MongoDB Atlas account:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth login<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">List accessible Atlas projects:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas projects <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">List clusters in the selected project:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">MongoDB Atlas CLI vs. MongoDB Shell<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It is important to distinguish MongoDB Atlas CLI from MongoDB Shell (<code>mongosh<\/code>).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Feature<\/th><th>MongoDB Atlas CLI<\/th><th>MongoDB Shell<\/th><\/tr><tr><td>Executable<\/td><td><code>atlas<\/code><\/td><td><code>mongosh<\/code><\/td><\/tr><tr><td>Primary purpose<\/td><td>Manage Atlas infrastructure<\/td><td>Query and modify database data<\/td><\/tr><tr><td>Manage Atlas projects<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Manage Atlas clusters<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Execute MongoDB queries<\/td><td>Not its primary purpose<\/td><td>Yes<\/td><\/tr><tr><td>Database administration<\/td><td>Atlas resource administration<\/td><td>Database-level operations<\/td><\/tr><tr><td>CI\/CD integration<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Installing Atlas CLI does not install a MongoDB database server. Homebrew&#8217;s Atlas CLI package also installs <code>mongosh<\/code>, but other distribution methods may require MongoDB Shell to be installed separately.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. System Requirements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before installation, confirm that your operating system is supported.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Operating system<\/th><th>Supported versions<\/th><th>Architecture<\/th><\/tr><tr><td>macOS<\/td><td>12.0 or later<\/td><td>Intel x86-64, ARM64<\/td><\/tr><tr><td>Windows<\/td><td>Windows 10, 11<\/td><td>x86-64<\/td><\/tr><tr><td>Windows Server<\/td><td>2016, 2019<\/td><td>x86-64<\/td><\/tr><tr><td>Ubuntu<\/td><td>22.04, 24.04<\/td><td>x86-64, ARM64<\/td><\/tr><tr><td>Debian<\/td><td>12, 13<\/td><td>x86-64, ARM64<\/td><\/tr><tr><td>RHEL \/ CentOS<\/td><td>8, 9, 10<\/td><td>x86-64, ARM64<\/td><\/tr><tr><td>Amazon Linux<\/td><td>2023<\/td><td>x86-64, ARM64<\/td><\/tr><tr><td>SUSE Linux Enterprise<\/td><td>15<\/td><td>x86-64, ARM64<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Additional Prerequisites<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You should have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An active internet connection.<\/li>\n\n\n\n<li>Terminal, Bash, Zsh, PowerShell, or Command Prompt access.<\/li>\n\n\n\n<li>Appropriate permissions to install software.<\/li>\n\n\n\n<li>A MongoDB Atlas account to manage cloud resources.<\/li>\n\n\n\n<li>Access to the required MongoDB Atlas organizations and projects.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can create a MongoDB Atlas account from:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.mongodb.com\/cloud\/atlas\/register\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">4. Install MongoDB Atlas CLI on macOS<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB recommends using Homebrew to install Atlas CLI on macOS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method supports both Intel and Apple Silicon Macs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Open Terminal<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open Terminal from:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Applications \u2192 Utilities \u2192 Terminal<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, press <code>Command + Space<\/code>, search for Terminal, and open it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Check macOS Version<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sw_vers<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Example output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTTP\" data-shcb-language-slug=\"http\"><span><code class=\"hljs language-http\"><span class=\"hljs-attribute\">ProductName<\/span>:        macOS\n<span class=\"hljs-attribute\">ProductVersion<\/span>:     26.6\n<span class=\"hljs-attribute\">BuildVersion<\/span>:       ...<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTTP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">http<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The actual values depend on your Mac.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the processor architecture:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">uname -m<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Possible outputs:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">arm64<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This indicates Apple Silicon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Or:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">x86_64<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This indicates an Intel architecture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both are supported.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Check Whether Homebrew Is Installed<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If Homebrew is installed, the command displays its version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you receive:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"HTTP\" data-shcb-language-slug=\"http\"><span><code class=\"hljs language-http\"><span class=\"hljs-attribute\">zsh<\/span>: command not found: brew<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTTP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">http<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Install Homebrew using the official installer:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">\/bin\/bash -c <span class=\"hljs-string\">\"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Review the installation instructions and complete the prompted steps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On Apple Silicon, Homebrew commonly uses:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">\/opt\/homebrew<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">On Intel Macs, the default prefix is commonly:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">\/usr\/local<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If <code>brew<\/code> remains unavailable, follow the shell configuration instructions displayed by the Homebrew installer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew --version<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 4: Update Homebrew<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew update<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This refreshes Homebrew&#8217;s package metadata.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Install MongoDB Atlas CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew install mongodb-atlas-cli<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Homebrew downloads and installs the Atlas CLI package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The package also installs MongoDB Shell (<code>mongosh<\/code>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An alternative supported Homebrew package name is:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew install mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Use either package, not both.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Verify MongoDB Atlas CLI Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Example output format:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">atlascli<\/span> <span class=\"hljs-selector-tag\">version<\/span>: 1<span class=\"hljs-selector-class\">.x<\/span><span class=\"hljs-selector-class\">.x<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The exact output varies by release.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Display available commands:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Or:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If the CLI displays usage information and available commands, the installation is successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Check the Atlas CLI Executable<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">which atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Or:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">command -v atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The command returns the executable path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For an Apple Silicon Homebrew installation, it may look like:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">\/opt\/homebrew\/bin\/atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">On an Intel Mac, it may be:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">\/usr\/local\/bin\/atlas<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 8: Verify MongoDB Shell (Optional)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">mongosh --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This confirms that MongoDB Shell is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>MongoDB Atlas CLI is now installed on macOS.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">5. Install MongoDB Atlas CLI on Windows 10\/11<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB provides official Windows installer packages in MSI and ZIP formats.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The MSI installer is generally the simplest option for Windows users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Install Using the Windows MSI Installer<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check Windows Architecture<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open PowerShell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-attr\">&#91;System.Runtime.InteropServices.RuntimeInformation]<\/span><span class=\"hljs-selector-pseudo\">::OSArchitecture<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Expected result on a supported x64 system:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">X64<\/code><\/span><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 2: Download Atlas CLI for Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Visit the official MongoDB Atlas CLI installation page:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/install-atlas-cli\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Or the official release page:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Download the appropriate Windows x86-64 MSI installer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Run the MSI Installer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locate the downloaded <code>.msi<\/code> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Double-click it and follow the installation wizard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Accept the installation location and complete the installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your environment, administrator permissions may be required.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Open a New PowerShell Terminal<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, open a new PowerShell window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If both commands work, the installation is complete.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify the Executable Location<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">Get-Command atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Alternatively:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">where<\/span><span class=\"hljs-selector-class\">.exe<\/span> <span class=\"hljs-selector-tag\">atlas<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These commands help identify which executable Windows is using.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If Atlas CLI is not found, check the installation directory and configure your Windows PATH environment variable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Install Using the Windows ZIP Package<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This method is useful if you prefer a portable installation or do not want to use MSI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download the ZIP Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Download the official Windows x86-64 ZIP archive from the latest release page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the commands below, rename the downloaded ZIP file to:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">atlas-cli-windows<\/span><span class=\"hljs-selector-class\">.zip<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Place it in your Downloads folder.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create an Installation Directory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open PowerShell:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$installDir = Join-Path $HOME <span class=\"hljs-string\">\"Tools\\AtlasCLI\"<\/span>\n\n<span class=\"hljs-keyword\">New<\/span>-Item -ItemType Directory -Path $installDir -Force<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Extract the Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">Expand-Archive `\n  -Path <span class=\"hljs-string\">\"$HOME\\Downloads\\atlas-cli-windows.zip\"<\/span> `\n  -DestinationPath $installDir `\n  -Force<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 4: Locate atlas.exe<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">Get-ChildItem -Path $installDir -Recurse -Filter atlas.exe<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Identify the directory containing <code>atlas.exe<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the executable is in a nested folder, move it to the main installation directory:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$atlasExe = Get-ChildItem -Path $installDir -Recurse -Filter atlas.exe |\n    Select-Object -First <span class=\"hljs-number\">1<\/span>\n\n<span class=\"hljs-keyword\">if<\/span> (-not $atlasExe) {\n    <span class=\"hljs-keyword\">throw<\/span> <span class=\"hljs-string\">\"atlas.exe was not found in the extracted archive.\"<\/span>\n}\n\n<span class=\"hljs-keyword\">if<\/span> ($atlasExe.DirectoryName -ne $installDir) {\n    Copy-Item $atlasExe.FullName (Join-Path $installDir <span class=\"hljs-string\">\"atlas.exe\"<\/span>) -Force\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 5: Test the Executable<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">&amp; <span class=\"hljs-string\">\"$installDir\\atlas.exe\"<\/span> --version<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 6: Add Atlas CLI to the Windows PATH<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$userPath = &#91;Environment]::GetEnvironmentVariable(<span class=\"hljs-string\">\"Path\"<\/span>, <span class=\"hljs-string\">\"User\"<\/span>)\n\n<span class=\"hljs-keyword\">if<\/span> (($userPath -split <span class=\"hljs-string\">\";\"<\/span>) -notcontains $installDir) {\n    $newPath = ($userPath.TrimEnd(<span class=\"hljs-string\">\";\"<\/span>) + <span class=\"hljs-string\">\";\"<\/span> + $installDir).TrimStart(<span class=\"hljs-string\">\";\"<\/span>)\n\n    &#91;Environment]::SetEnvironmentVariable(\n        <span class=\"hljs-string\">\"Path\"<\/span>,\n        $newPath,\n        <span class=\"hljs-string\">\"User\"<\/span>\n    )\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Update the current PowerShell session:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$env:Path += <span class=\"hljs-string\">\";$installDir\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 7: Verify Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">MongoDB Atlas CLI is now ready to use on Windows.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">6. Install MongoDB Atlas CLI on Ubuntu Linux<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB provides Debian packages and an official APT installation method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following repository example follows MongoDB&#8217;s documented Ubuntu 22.04 (<code>jammy<\/code>) repository configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Install Using APT on Ubuntu 22.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check Ubuntu Version<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cat \/etc\/os-release<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check architecture:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">uname -m<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Possible values include:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">x86_64<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Or:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">aarch64<\/code><\/span><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 2: Update Package Metadata<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">sudo apt-<span class=\"hljs-keyword\">get<\/span> update<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install Dependencies<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">sudo apt-<span class=\"hljs-keyword\">get<\/span> install -y curl gnupg ca-certificates<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 4: Import MongoDB&#8217;s Repository Signing Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-19\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">curl -fsSL https:<span class=\"hljs-comment\">\/\/pgp.mongodb.com\/server-8.0.asc | \\<\/span>\n  sudo gpg -o \/usr\/share\/keyrings\/mongodb-server<span class=\"hljs-number\">-8.0<\/span>.gpg \\\n  --dearmor<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-19\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This imports the repository signing key into a dedicated keyring.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Add the MongoDB Repository<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-20\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"deb &#91; arch=amd64,arm64 signed-by=\/usr\/share\/keyrings\/mongodb-server-8.0.gpg ] \\\nhttps:\/\/repo.mongodb.com\/apt\/ubuntu jammy\/mongodb-enterprise\/8.0 \\\nmultiverse\"<\/span> | sudo tee \/etc\/apt\/sources.<span class=\"hljs-keyword\">list<\/span>.d\/mongodb-enterprise<span class=\"hljs-number\">-8.0<\/span>.<span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-20\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> This repository command specifically uses Ubuntu <code>jammy<\/code> (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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Update APT<\/h3>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-21\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">sudo apt-<span class=\"hljs-keyword\">get<\/span> update<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-21\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 7: Install MongoDB Atlas CLI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-22\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">sudo apt-<span class=\"hljs-keyword\">get<\/span> install -y mongodb-atlas<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-22\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Notice the package name:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This is the documented APT repository package name, whereas the Homebrew package is named <code>mongodb-atlas-cli<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Verify Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">And:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Find the executable:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">command -v atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check the installed package:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dpkg -l mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The installation is complete.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Install Using a DEB File on Ubuntu or Debian<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This approach is useful on supported Ubuntu and Debian versions when you do not want to configure an additional APT repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download the Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Download the Linux <code>.deb<\/code> file matching your architecture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, release assets use names in this format:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-23\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">mongodb-atlas-cli_1<\/span><span class=\"hljs-selector-class\">.59<\/span><span class=\"hljs-selector-class\">.3_linux_x86_64<\/span><span class=\"hljs-selector-class\">.deb<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-23\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For ARM64:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-24\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">mongodb-atlas-cli_1<\/span><span class=\"hljs-selector-class\">.59<\/span><span class=\"hljs-selector-class\">.3_linux_arm64<\/span><span class=\"hljs-selector-class\">.deb<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-24\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These filenames refer to release 1.59.3. Use the equivalent filename for whichever version you download.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Navigate to Downloads<\/h3>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cd ~\/Downloads<\/code><\/span><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install the Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For an x86-64 package, using the filename above:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo apt install .\/mongodb-atlas-cli_1.59.3_linux_x86_64.deb<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For ARM64:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo apt install .\/mongodb-atlas-cli_1.59.3_linux_arm64.deb<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Use only the command corresponding to your downloaded file and architecture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">APT attempts to resolve dependencies using the configured repositories.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Verify Installation<\/h3>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">MongoDB Atlas CLI is now installed.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">7. Install MongoDB Atlas CLI on RHEL and CentOS<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB also supports RHEL and CentOS through RPM packages and YUM-compatible repositories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Install Using the MongoDB YUM Repository<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check the Operating System<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cat \/etc\/os-release<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check processor architecture:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">uname -m<\/code><\/span><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create the MongoDB Repository Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo tee \/etc\/yum.repos.d\/mongodb-enterprise-8.0.repo &lt;&lt;EOF<\/code><\/span><\/pre>\n\n<p>[mongodb-enterprise-8.0]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This configures MongoDB&#8217;s documented Enterprise 8.0 RPM repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install MongoDB Atlas CLI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo yum install -y mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">On modern RHEL-based systems, <code>dnf<\/code> is also commonly available:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo dnf install -y mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Use the package manager supported by your distribution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Verify Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check the package:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">rpm -q mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Display available commands:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --help<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Method 2: Install Directly from an RPM Package<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Download the appropriate RPM package from:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-25\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">mongodb-atlas-cli_1<\/span><span class=\"hljs-selector-class\">.59<\/span><span class=\"hljs-selector-class\">.3_linux_x86_64<\/span><span class=\"hljs-selector-class\">.rpm<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-25\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Navigate to the downloaded package directory:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cd ~\/Downloads<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Install:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo dnf install .\/mongodb-atlas-cli_1.59.3_linux_x86_64.rpm<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For ARM64, download the corresponding <code>linux_arm64.rpm<\/code> package instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Amazon Linux:<\/strong> For Amazon Linux 2023, use a compatible RPM package or confirm the appropriate repository configuration for your platform before installation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">8. Alternative Linux Installation Using a TAR.GZ Archive<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB also distributes standalone Linux binary archives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method is useful when you want to install the CLI without managing an RPM or Debian package.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download the Correct Archive<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Visit:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Download the Linux TAR.GZ archive corresponding to your processor architecture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-26\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">mongodb-atlas-cli_1<\/span><span class=\"hljs-selector-class\">.59<\/span><span class=\"hljs-selector-class\">.3_linux_x86_64<\/span><span class=\"hljs-selector-class\">.tar<\/span><span class=\"hljs-selector-class\">.gz<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-26\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 2: Extract the Archive<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to Downloads:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">cd ~\/Downloads<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Extract:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-27\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">tar<\/span> <span class=\"hljs-selector-tag\">-xzf<\/span> <span class=\"hljs-selector-tag\">mongodb-atlas-cli_1<\/span><span class=\"hljs-selector-class\">.59<\/span><span class=\"hljs-selector-class\">.3_linux_x86_64<\/span><span class=\"hljs-selector-class\">.tar<\/span><span class=\"hljs-selector-class\">.gz<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-27\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Locate the Executable<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">find . -type f -name atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The command locates an executable named <code>atlas<\/code> in the extracted files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Install the Binary<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After finding the extracted executable, install it in a directory on your <code>PATH<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if the extracted binary is at <code>.\/bin\/atlas<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo install -m 0755 .\/bin\/atlas \/usr\/local\/bin\/atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Adjust the source path if the extracted archive uses a different directory structure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify Installation<\/h3>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">You can now invoke the Atlas CLI from any terminal directory.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">9. Authenticate with MongoDB Atlas CLI<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">After installing the CLI, the next step is authenticating with MongoDB Atlas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Log In Using Your Atlas Account<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth login<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The CLI initiates an authentication workflow using your browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A one-time activation code is generated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code expires after approximately 10 minutes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Complete the authentication process in the browser and return to the terminal.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Verify Authentication<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth whoami<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This command displays information about the currently authenticated identity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: List MongoDB Atlas Projects<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-28\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas projects <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-28\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The command lists projects accessible to the authenticated identity, subject to the required permissions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For JSON-formatted output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-29\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas projects <span class=\"hljs-keyword\">list<\/span> --output json<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-29\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 4: List MongoDB Atlas Clusters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-30\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-30\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">To query a specific project without changing your default configuration:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-31\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span> --projectId YOUR_PROJECT_ID<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-31\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Replace <code>YOUR_PROJECT_ID<\/code> with your actual MongoDB Atlas project ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: View Cluster Details<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas clusters describe YOUR_CLUSTER_NAME<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Specify the project if necessary:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas clusters describe YOUR_CLUSTER_NAME \\\n  --projectId YOUR_PROJECT_ID<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">On PowerShell, keep the command on one line or use PowerShell&#8217;s backtick continuation syntax instead of Bash&#8217;s backslash.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Log Out<\/h2>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth logout<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This ends the CLI&#8217;s authenticated session.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">10. Configure Atlas CLI Using API Keys<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">For CI\/CD pipelines, Terraform workflows, infrastructure automation, or unattended scripts, interactive browser authentication is generally not appropriate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB Atlas supports API key and service-account authentication.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create an Atlas API Key<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the MongoDB Atlas console, configure an appropriate organization or project API key with the required permissions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep access scoped to the operations the automation needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Initialize the CLI Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas config init<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The CLI prompts for the API credentials and configuration information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the prompts rather than placing private credentials directly in command arguments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Verify the Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-32\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas config <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-32\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">To inspect the default profile:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-33\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">atlas config describe <span class=\"hljs-keyword\">default<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-33\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Sensitive API key values are redacted from the normal configuration description output.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Security recommendation:<\/strong> 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.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">11. Manage Multiple Atlas Environments with Profiles<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">When working with development, staging, and production environments, separate Atlas CLI profiles can help reduce mistakes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Configure a Development Profile<\/h2>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth login --profile development<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Complete the authentication process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Configure a Production Profile<\/h2>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth login --profile production<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Use the appropriate account and organization permissions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: List Configured Profiles<\/h2>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-34\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas config <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-34\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 4: Run Commands with a Specific Profile<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Development:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-35\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span> --profile development<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-35\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Production:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-36\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span> --profile production<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-36\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Profiles can store default organization and project information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> 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 <code>--projectId<\/code> is useful when running commands against sensitive resources.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">12. Essential MongoDB Atlas CLI Commands<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">The following commands are useful immediately after installation.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Task<\/th><th>Command<\/th><\/tr><tr><td>Check CLI version<\/td><td><code>atlas --version<\/code><\/td><\/tr><tr><td>Show help<\/td><td><code>atlas --help<\/code><\/td><\/tr><tr><td>Log in<\/td><td><code>atlas auth login<\/code><\/td><\/tr><tr><td>Check authenticated identity<\/td><td><code>atlas auth whoami<\/code><\/td><\/tr><tr><td>Log out<\/td><td><code>atlas auth logout<\/code><\/td><\/tr><tr><td>List projects<\/td><td><code>atlas projects list<\/code><\/td><\/tr><tr><td>List clusters<\/td><td><code>atlas clusters list<\/code><\/td><\/tr><tr><td>View cluster details<\/td><td><code>atlas clusters describe CLUSTER_NAME<\/code><\/td><\/tr><tr><td>List profiles<\/td><td><code>atlas config list<\/code><\/td><\/tr><tr><td>Configure API keys interactively<\/td><td><code>atlas config init<\/code><\/td><\/tr><tr><td>View profile configuration<\/td><td><code>atlas config describe default<\/code><\/td><\/tr><tr><td>View project JSON<\/td><td><code>atlas projects list --output json<\/code><\/td><\/tr><tr><td>Show cluster help<\/td><td><code>atlas clusters --help<\/code><\/td><\/tr><tr><td>Show API command help<\/td><td><code>atlas api --help<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Validate Atlas CLI and Cluster Access<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following Bash script checks that the CLI is installed and confirms access to MongoDB Atlas:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-37\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\">#!\/usr\/bin\/env bash<\/span>\n\nset -euo pipefail\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Checking MongoDB Atlas CLI...\"<\/span>\n\natlas --version\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Checking authentication...\"<\/span>\n\natlas auth whoami\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Listing available projects...\"<\/span>\n\natlas projects <span class=\"hljs-keyword\">list<\/span>\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Listing clusters in the selected project...\"<\/span>\n\natlas clusters <span class=\"hljs-keyword\">list<\/span>\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Validation completed successfully.\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-37\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Save the file as:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-38\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">check-atlas-cli<\/span><span class=\"hljs-selector-class\">.sh<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-38\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Make it executable:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-39\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">chmod<\/span> +<span class=\"hljs-selector-tag\">x<\/span> <span class=\"hljs-selector-tag\">check-atlas-cli<\/span><span class=\"hljs-selector-class\">.sh<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-39\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">.\/check-atlas-cli.sh<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This is a read-only validation example. It does not create, update, or delete cloud resources.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">13. How to Update MongoDB Atlas CLI<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Keeping the CLI updated helps maintain compatibility and provides access to bug fixes and new functionality.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">macOS \u2014 Homebrew<\/h2>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew update\nbrew upgrade mongodb-atlas-cli<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If you installed using the alternative Homebrew package:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew upgrade mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Verify:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Ubuntu\/Debian \u2014 APT Repository Installation<\/h2>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-40\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">sudo apt-<span class=\"hljs-keyword\">get<\/span> update\nsudo apt-<span class=\"hljs-keyword\">get<\/span> install --only-upgrade mongodb-atlas<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-40\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">This assumes you installed the <code>mongodb-atlas<\/code> package from a configured APT repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed a downloaded DEB package instead, obtain the updated DEB file and install that version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">RHEL\/CentOS \u2014 YUM or DNF<\/h2>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo yum update mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Or:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo dnf upgrade mongodb-atlas<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Windows \u2014 MSI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Download the latest supported MSI installer and run the installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For ZIP-based installations, download the updated ZIP and replace the old executable with the new one after verifying the package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Always confirm:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">14. Troubleshooting Common MongoDB Atlas CLI Errors<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Error or issue<\/th><th>Possible cause<\/th><th>Recommended fix<\/th><\/tr><tr><td><code>atlas: command not found<\/code><\/td><td>CLI not installed or PATH missing<\/td><td>Verify executable location and PATH<\/td><\/tr><tr><td><code>zsh: command not found: brew<\/code><\/td><td>Homebrew missing or incorrectly configured<\/td><td>Install\/configure Homebrew<\/td><\/tr><tr><td><code>atlas is not recognized<\/code><\/td><td>Windows cannot locate executable<\/td><td>Add the CLI directory to PATH<\/td><\/tr><tr><td><code>Permission denied<\/code><\/td><td>Executable permission problem<\/td><td>Verify permissions and installation path<\/td><\/tr><tr><td><code>exec format error<\/code><\/td><td>Incorrect operating system or CPU architecture<\/td><td>Download the correct binary<\/td><\/tr><tr><td><code>401 Unauthorized<\/code><\/td><td>Invalid or expired authentication<\/td><td>Reauthenticate and verify credentials<\/td><\/tr><tr><td><code>403 Forbidden<\/code><\/td><td>Insufficient Atlas permissions<\/td><td>Review organization\/project roles and API access settings<\/td><\/tr><tr><td>TLS certificate error<\/td><td>Certificate trust or proxy issue<\/td><td>Check CA certificates and network configuration<\/td><\/tr><tr><td>APT repository error<\/td><td>Incorrect source, signing key, or distribution<\/td><td>Check the repository setup<\/td><\/tr><tr><td>Authentication timeout<\/td><td>Network, proxy, or browser authentication issue<\/td><td>Verify connectivity and repeat login<\/td><\/tr><tr><td>No clusters returned<\/td><td>Incorrect project selection or insufficient access<\/td><td>Check profile, project ID, and permissions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting 1: atlas Command Not Found on macOS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">command -v atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check the installed Homebrew package:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-41\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">brew <span class=\"hljs-keyword\">list<\/span> mongodb-atlas-cli<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-41\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Verify your shell PATH:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-42\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"$PATH\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-42\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If Homebrew is installed but unavailable in the shell, check the Homebrew environment configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting 2: Atlas CLI Not Recognized on Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">Get-Command atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check PATH:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-43\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$env:Path<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-43\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Confirm that the directory containing <code>atlas.exe<\/code> is present.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you just updated PATH, close and reopen PowerShell.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting 3: MongoDB Atlas Authentication Failed<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First verify local installation:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas --version<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Try logging in again:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth login<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Check your authentication state:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">atlas auth whoami<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If an API key is being used, verify its validity, scope, and applicable access-list requirements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting 4: Cannot List MongoDB Atlas Clusters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-44\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas projects <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-44\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then explicitly specify the target project:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-45\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas clusters <span class=\"hljs-keyword\">list<\/span> --projectId YOUR_PROJECT_ID<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-45\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If the operation returns an authorization error, confirm the identity has sufficient project-level permissions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting 5: Network or Proxy Problems<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Organizations using corporate firewalls may require proxy configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For Bash:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-46\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">export<\/span> HTTPS_PROXY=<span class=\"hljs-string\">\"http:\/\/proxy.example.com:8080\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-46\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For Windows PowerShell:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-47\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$env:HTTPS_PROXY = <span class=\"hljs-string\">\"http:\/\/proxy.example.com:8080\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-47\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The proxy address is an illustrative placeholder. Replace it with your organization&#8217;s approved proxy settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For normal operations, use a trusted certificate chain rather than disabling TLS certificate verification.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">15. How to Uninstall MongoDB Atlas CLI<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">macOS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If installed with Homebrew:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew uninstall mongodb-atlas-cli<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Or, if applicable:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">brew uninstall mongodb-atlas<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Ubuntu\/Debian<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For an installation from the MongoDB APT repository:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo apt remove mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For a standalone DEB installation, determine its installed package name first:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dpkg -l | grep -i atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Then remove only the corresponding Atlas CLI package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">RHEL\/CentOS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the repository package:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">sudo dnf remove mongodb-atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For direct RPM installations, first inspect:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">rpm -qa | grep -i atlas<\/code><\/span><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Remove the relevant installed package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For MSI installations, use Windows Settings \u2192 Installed Apps to uninstall MongoDB Atlas CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For portable ZIP installations, delete the installed executable and remove its directory from your PATH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configuration profiles may remain after uninstalling the executable. Delete them only if you intentionally want to remove local authentication and configuration information.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">16. Frequently Asked Questions<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Q1. Is MongoDB Atlas CLI free to install?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. MongoDB Atlas CLI is freely available to download and install. However, cloud database infrastructure provisioned through Atlas may incur charges.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q2. Do I need MongoDB Server installed to use Atlas CLI?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Atlas CLI communicates with MongoDB Atlas management services and does not require a local MongoDB database server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q3. Does MongoDB Atlas CLI work on Apple Silicon?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. MongoDB Atlas CLI supports ARM-based Apple Silicon Macs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q4. Can I install MongoDB Atlas CLI on Windows 11?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Download the official Windows x86-64 MSI or ZIP package.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q5. What is the difference between <code>atlas<\/code> and <code>mongocli<\/code>?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>atlas<\/code> is the dedicated MongoDB Atlas CLI. The older MongoDB CLI (<code>mongocli<\/code>) supported MongoDB Atlas, Cloud Manager, and Ops Manager.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB has deprecated <code>mongocli atlas<\/code> commands and recommends migrating Atlas operations to <code>atlas<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q6. Can I use MongoDB Atlas CLI with Terraform?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, but the tools serve different purposes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Terraform is typically used to define and manage MongoDB Atlas infrastructure declaratively through the MongoDB Atlas provider.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Atlas CLI is useful for interactive administrative operations, troubleshooting, inspection, and scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For infrastructure managed by Terraform, avoid making untracked CLI changes that could create configuration drift.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q7. Can I use MongoDB Atlas CLI in GitHub Actions or CI\/CD?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Use appropriately scoped machine credentials or service accounts with secure secret management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid interactive login commands in unattended pipelines.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q8. Is MongoDB Compass required?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. MongoDB Compass is an optional graphical tool used to explore and work with MongoDB database data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Atlas CLI works independently.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">17. Best Practices for Production Environments<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these guidelines when using Atlas CLI in enterprise and production environments:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Install Atlas CLI from official MongoDB sources.<\/li>\n\n\n\n<li>Verify downloaded packages and checksums before deploying to sensitive environments.<\/li>\n\n\n\n<li>Pin CLI versions in automated environments.<\/li>\n\n\n\n<li>Use separate, appropriately scoped credentials for development and production.<\/li>\n\n\n\n<li>Prefer service accounts or narrowly scoped API keys for CI\/CD.<\/li>\n\n\n\n<li>Avoid storing credentials directly in scripts, repositories, or command history.<\/li>\n\n\n\n<li>Check the selected organization and project before performing modifications.<\/li>\n\n\n\n<li>Prefer read-only access for monitoring and inspection workflows.<\/li>\n\n\n\n<li>Use Terraform or another infrastructure-as-code solution for infrastructure that requires controlled declarative state.<\/li>\n\n\n\n<li>Review commands and their permissions before running them in production.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Production safety tip:<\/strong> The <code>atlas setup<\/code> 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.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">18. MongoDB Atlas CLI Installation Cheat Sheet<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Operating system<\/th><th>Installation<\/th><\/tr><tr><td>macOS Intel<\/td><td><code>brew install mongodb-atlas-cli<\/code><\/td><\/tr><tr><td>macOS Apple Silicon<\/td><td><code>brew install mongodb-atlas-cli<\/code><\/td><\/tr><tr><td>Windows 10\/11<\/td><td>Official MSI or ZIP installer<\/td><\/tr><tr><td>Ubuntu 22.04<\/td><td>Configure MongoDB APT repository, then <code>sudo apt-get install mongodb-atlas<\/code><\/td><\/tr><tr><td>Ubuntu 24.04<\/td><td>Official compatible DEB package<\/td><\/tr><tr><td>Debian 12\/13<\/td><td>Official compatible DEB package<\/td><\/tr><tr><td>RHEL\/CentOS<\/td><td>MongoDB YUM repository or RPM package<\/td><\/tr><tr><td>Amazon Linux 2023<\/td><td>Compatible official RPM package<\/td><\/tr><tr><td>Other supported Linux systems<\/td><td>Official TAR.GZ binary<\/td><\/tr><tr><td>Verify<\/td><td><code>atlas --version<\/code><\/td><\/tr><tr><td>Authenticate<\/td><td><code>atlas auth login<\/code><\/td><\/tr><tr><td>Check authentication<\/td><td><code>atlas auth whoami<\/code><\/td><\/tr><tr><td>List projects<\/td><td><code>atlas projects list<\/code><\/td><\/tr><tr><td>List clusters<\/td><td><code>atlas clusters list<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">19. Conclusion<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">MongoDB Atlas CLI is an essential command-line tool for developers, database administrators, DevOps engineers, and platform teams managing MongoDB Atlas cloud infrastructure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installation is straightforward on the three major operating systems:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On <strong>macOS<\/strong>, Homebrew provides a convenient installation and update process.<\/li>\n\n\n\n<li>On <strong>Windows<\/strong>, the official MSI installer is the easiest choice, while ZIP packages support portable installations.<\/li>\n\n\n\n<li>On <strong>Linux<\/strong>, MongoDB offers APT repositories, YUM-compatible repositories, DEB packages, RPM packages, and standalone binary archives.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once installed, start with the following commands:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-48\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">atlas --version\natlas auth login\natlas auth whoami\natlas projects <span class=\"hljs-keyword\">list<\/span>\natlas clusters <span class=\"hljs-keyword\">list<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-48\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">These commands confirm your installation, authenticate your Atlas account, and help you explore the cloud resources available to you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Official References<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MongoDB Atlas CLI Documentation:<\/strong> <a href=\"https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/\">https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI Installation Guide:<\/strong> <a href=\"https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/install-atlas-cli\/\">https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/install-atlas-cli\/<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI Compatibility:<\/strong> <a href=\"https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/compatibility\/\">https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/compatibility\/<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI GitHub Repository:<\/strong> <a href=\"https:\/\/github.com\/mongodb\/mongodb-atlas-cli\">https:\/\/github.com\/mongodb\/mongodb-atlas-cli<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI Releases:<\/strong> <a href=\"https:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest\">https:\/\/github.com\/mongodb\/mongodb-atlas-cli\/releases\/latest<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI Configuration:<\/strong> <a href=\"https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/atlas-cli-save-connection-settings\/\">https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/atlas-cli-save-connection-settings\/<\/a><\/li>\n\n\n\n<li><strong>Atlas CLI Package Verification:<\/strong> <a href=\"https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/verify-packages\/\">https:\/\/www.mongodb.com\/docs\/atlas\/cli\/current\/verify-packages\/<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>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.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SEO Title: Install MongoDB Atlas CLI on macOS, Windows &amp; Linux \u2013 Complete Guide Meta Description: Learn how to install MongoDB Atlas CLI on macOS, Windows, Ubuntu,&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[11138],"tags":[],"class_list":["post-79422","post","type-post","status-publish","format-standard","hentry","category-best-tools"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/79422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=79422"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/79422\/revisions"}],"predecessor-version":[{"id":79423,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/79422\/revisions\/79423"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=79422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=79422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=79422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}