Open In App

How to Install mongodb on Arch-based Linux Distributions(Manjaro)

In this article, we are going to see how to install the MongoDB server on Arch-based Linux Distributions. We are going to use the Yay AUR helper, which is one of the many AUR helpers that can be used to install MongoDB or any other AUR package. 

Installation of MongoDB

Step 1: Update and upgrade your system by running

$ sudo pacman -Syu




Step 2: Before installing yay, we must install the git and base-devel group packages on the system.

$ sudo pacman -S --needed base-devel git




Step 3: Now, install yay by running the following

$ git clone

$ cd yay-git

$ makepkg -sri



Step 4: Verify the installation by running.

$ yay --version


Step 5: Next, install MongoDB by running the following command and opt for the default package once the installation starts.

$ yay -S mongodb-bin







Step 6: Now, run the mongodb service by using systemctl command.

$ sudo systemctl start mongodb

$ sudo systemctl status mongodb


Step 7: Once again use systemctl command to enable mongodb service. Now, mongodb will restart whenever your machine boots up.

$ sudo systemctl enable mongodb


Step 9: Test the connection status by running the mongo shell command

$ mongo --version


Uninstallation of MongoDB

To uninstall MongoDB and all of its config files run:

$ sudo pacman -Rns mongodb-bin


Article Tags :