Install the Atlas CLI to quickly provision and manage Atlas database deployments from the terminal.
To verify packages before installation, see Verify the Integrity of Atlas CLI Packages.
Select one of the following installation methods and follow the steps to install the Atlas CLI.
To check whether your operating system is compatible with the Atlas CLI, see Check Compatibility.
To install the Atlas CLI using Homebrew, you must:
Use a MacOS or Linux operating system.
Install Homebrew.
To install the Atlas CLI using Apt, you must install gnupg
and curl
:
sudo apt-get install gnupg curl
To install the Atlas CLI using Chocolatey, you must do the following:
Ensure that your system meets the requirements for installing Chocolatey.
Install Chocolatey using cmd.exe
or PowerShell.exe
. To learn more, see Installing Chocolatey.
Invoke the following brew
command to install both the Atlas CLI and mongosh
:
brew install mongodb-atlas
Note
You can also use the brew install mongodb-atlas-cli
command to install both the Atlas CLI and mongosh
. You can't install the Atlas CLI alone on Homebrew.
Run the atlas
command from any directory:
The response includes available commands and options for the Atlas CLI.
Create a /etc/yum.repos.d/mongodb-org-7.0.repo
file so that you can install Atlas CLI directly using yum
. Replace 7.0
with your edition of MongoDB.
[mongodb-org-7.0]name=MongoDB Repositorybaseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/7.0/x86_64/gpgcheck=1enabled=1gpgkey=https://pgp.mongodb.com/server-7.0.asc
[mongodb-org-7.0]name=MongoDB Repositorybaseurl=https://repo.mongodb.org/yum/amazon/2023/mongodb-org/7.0/x86_64/gpgcheck=1enabled=1gpgkey=https://pgp.mongodb.com/server-7.0.asc
Create a /etc/yum.repos.d/mongodb-enterprise-7.0.repo
file so that you can install Atlas CLI directly using yum
. Replace 7.0
with your edition of MongoDB.
[mongodb-enterprise-7.0]name=MongoDB Repositorybaseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/7.0/$basearch/gpgcheck=1enabled=1gpgkey=https://pgp.mongodb.com/server-7.0.asc
[mongodb-enterprise-7.0]name=MongoDB Enterprise Repositorybaseurl=https://repo.mongodb.com/yum/amazon/2023/mongodb-enterprise/7.0/$basearch/gpgcheck=1enabled=1gpgkey=https://pgp.mongodb.com/server-7.0.asc
Invoke the following yum
command to install both the Atlas CLI and mongosh
:
sudo yum install -y mongodb-atlas
If you don't want to install mongosh
, invoke the following yum
command instead to install the Atlas CLI only:
sudo yum install -y mongodb-atlas-cli
Run the atlas
command from any directory:
The response includes available commands and options for the Atlas CLI.
From a terminal, issue the following command to import the MongoDB public GPG Key from https://pgp.mongodb.com/server-7.0.asc
. Replace 7.0
with your edition of MongoDB.
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ --dearmor
A successful command returns an OK
.
Select Ubuntu or Debian, then select your version.
Create the list file /etc/apt/sources.list.d/mongodb-org-7.0.list
for your version of Ubuntu. Replace 7.0
with your edition of MongoDB.
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
Create the list file /etc/apt/sources.list.d/mongodb-org-7.0.list
for your version of Debian. Replace 7.0
with your edition of MongoDB.
echo "deb http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
echo "deb http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
Select Ubuntu or Debian, then select your version.
Create a /etc/apt/sources.list.d/mongodb-enterprise.list
file for your version of Ubuntu. Replace 7.0
with your edition of MongoDB.
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.com/apt/ubuntu jammy/mongodb-enterprise/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.com/apt/ubuntu focal/mongodb-enterprise/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.com/apt/ubuntu bionic/mongodb-enterprise/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
Create a /etc/apt/sources.list.d/mongodb-enterprise.list
file for your version of Debian. Replace 7.0
with your edition of MongoDB.
echo "deb http://repo.mongodb.com/apt/debian bullseye/mongodb-enterprise/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
Invoke the following apt
command:
Invoke the following apt
command to install both the Atlas CLI and mongosh
:
sudo apt-get install -y mongodb-atlas
If you don't want to install mongosh
, invoke the following apt
command instead to install the Atlas CLI only:
sudo apt-get install -y mongodb-atlas-cli
Run the atlas
command from any directory:
The response includes available commands and options for the Atlas CLI.
choco install mongodb-atlas
Run the atlas
command from any directory:
The response includes available commands and options for the Atlas CLI.
To pull the latest Atlas CLI Docker image , run the following command:
docker pull mongodb/atlas
If you run docker pull mongodb/atlas
without specifying a version tag, Docker automatically pulls the latest version of the Docker image (mongodb/atlas:latest
).
To pull a specific version of the Docker image, run the following command, replacing <tag>
with the version tag:
docker pull mongodb/atlas:<tag>
To learn how to run Atlas CLI commands with Docker after you pull the Docker image, see Run Atlas CLI Commands with Docker.
Download and extract the correct binary for your operating system:
NoteReplace or remove any existing MongoDB CLI binaries to prevent conflicts between versions.
Run the executable file.
Run the atlas
command from any directory:
The response includes available commands and options for the Atlas CLI.
To update the Atlas CLI, follow the procedure that corresponds with the method you used to install the Atlas CLI:
If you installed the Atlas CLI and mongosh
together using the mongodb-atlas
package, invoke the following brew
command:
brew updatebrew upgrade mongodb-atlas
If you installed the Atlas CLI and mongosh
together using the mongodb-atlas-cli
package, invoke the following brew
command:
brew updatebrew upgrade mongodb-atlas-cli
Run the --version
command:
The response returns your Atlas CLI version.
If you installed the Atlas CLI and mongosh
together using the mongodb-atlas
package, invoke the following yum
command:
If you installed the Atlas CLI only using the mongodb-atlas-cli
package, invoke the following yum
command:
yum update mongodb-atlas-cli
Run the --version
command:
The response returns your Atlas CLI version.
If you installed the Atlas CLI and mongosh
together using the mongodb-atlas
package, invoke the following apt
command:
sudo apt-get install --only-upgrade mongodb-atlas
If you installed the Atlas CLI only using the mongodb-atlas-cli
package, invoke the following apt
command:
sudo apt-get install --only-upgrade mongodb-atlas-cli
Run the --version
command:
The response returns your Atlas CLI version.
choco upgrade mongodb-atlas
Run the --version
command:
The response returns your Atlas CLI version.
Remove any existing Atlas CLI binaries to prevent version conflicts.
Download and extract the correct binary for your operating system:
Run the executable file.
Run the --version
command:
The response returns your Atlas CLI version.
Connect from the Atlas CLI to start using the Atlas CLI commands.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4