How to install MongoDB CE on Ubuntu in 1 minute

Quick install using

wget -qO- | bash

Run these shell commands on your Ubuntu computer to install the current MongoDB community edition and automatically start it (both instantly and on bootup)

curl -fsSL | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl enable --now mongod

Source: Official MongoDB documentation