MongoDB Ditches Tradition, Pushes Developers to Download Software Separately.
Tags: webdev, javascript, programming, tutorial
Published: 2023-04-05 11:26:56

## Hey there developers! 👋🏾

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3nez8o0aoxx7ysgaxlma.png)

If you're a fan of using MongoDB for your database needs, you may have noticed that the latest version 6 no longer comes bundled with **_mongo.exe_** But no worries, I'm here to guide you through the process of downloading and installing MongoDB and its shell, Mongosh for mongoDB to work.


## First off,

head on over to the [official MongoDB website](https://www.mongodb.com/try/download/community), 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j7t3uq0rc3yu059yr8dt.png)
scroll down,

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlp2n3hnvnzj58scx1aa.png)
and download the version of MongoDB that's right for you. 

> Make sure to choose the version compatible with your operating system.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpraz61ea8jja17gx5l3.png)
Once you have the downloaded file, let's get started with the installation process:


## Step 1: Install MongoDB

1. **Double-click** on the downloaded file to open the installer.
 
2. Follow the instructions on the screen to complete the installation process.
 
3. Once the installation is complete, you'll need to run the mongod process to start the MongoDB server. To do this, open up a terminal or command prompt and navigate to the bin directory within the MongoDB installation folder.

> Mine was "**C:\Program Files\MongoDB\Server\{version_number}\bin**".
> Replace "**{version_number}**" with the version of MongoDB you have installed. the current version as at writing was **_6.0_**

4. Then run the following command:

```js
mongod.exe --dbpath "C:\data\db"
```
### or

```js
mongod --dbpath "C:\data\db"
```
This command will start the MongoDB server and use the directory "**C:\data\db**"(data directory with db directory inside) as the data directory for the server. If the directory does not exist, It will create it before running the command "_**mongod.exe**_" or "_**mongod**_".
you should see some output in the terminal indicating that it's running.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d54fkuuv894v4xa0i8at.png)
> **Note:  Keep the Command Prompt or PowerShell window open and running**

## Step 2: Install Mongosh

1. Head over to the  [Mongosh download page](https://www.mongodb.com/try/download/shell)

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z411uavwh8bj13kskfa0.png)
2. Download the zip file for your operating system.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rb5f380fppr8uo7cemw0.png)
3. Extract the contents of the zip file to the **_bin directory_** within the MongoDB installation folder.

4. Copy the Contents in the just zipped bin's folder and paste it in the mongoDB bin's folder.

5. Open up a terminal or command prompt and navigate to the bin directory within the MongoDB installation folder.

To start using Mongosh, run the following command:

```js
mongosh
```

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bji2kxkno428ttzvtur.png)

### And that's it!

You should now be able to start working with your MongoDB database using the Mongosh shell.

So there you have it, a simple and straightforward guide on how to download and install MongoDB and Mongosh. Happy coding!"