MongoDB (27017)

Usage

Install MongoDB Shell. If you're using a modern MongoDB deployment, you might need mongosh (the newer Mongo shell):

# MongoDB shell
sudo apt update
sudo apt install mongodb-clients

# Mongosh
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor

echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

sudo apt update

sudo apt install -y mongodb-mongosh

Last updated

Was this helpful?