wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list sudo apt-get update sudo apt-get install -y mongodb-org sudo systemctl status mongod.service https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ Directories If you installed via the package manager, the data directory /var/lib/mongodb and the log directory /var/log/mongodb are created during the installation. By default, MongoDB runs using the mongodb user account. If you change the user that runs the MongoDB process, you must also modify the permission to the data and log directories to give this user access to these directories. ERROR FIX This works for me: Stop mongod process by entering the following command in terminal: sudo systemctl stop mongod You have to make directory for "dbPath...