1. Import the public key used by the package management system
\`\`\` wget -qO – https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - \`\`\`1. Create a list file for MongoDB \`\`\` echo “deb focal/mongodb-org/4.4 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list \`\`\`
1. Reload local package database \`\`\` sudo apt-get update \`\`\`
1. Install the MongoDB packages \`\`\` sudo apt-get install -y mongodb-org \`\`\`
1. Start MongoDB \`\`\` sudo systemctl start mongod \`\`\`
If you want to start the MongoDB service by default when the system starts \`\`\` sudo systemctl enable mongod \`\`\`1. Verify That MongoDB Has Started Successfully \`\`\` sudo systemctl status mongod \`\`\`
1. Begin using MongoDB \`\`\` mongo \`\`\`
Remember to replace the URL and version number in the second step with the appropriate ones for your specific version of Ubuntu and MongoDB.