Chapter 1: The Mongod - Lab: Change the Default DB Path

In this Lab, we are instructed to create a new folder /var/mongodb/db/ using the command:

mkdir -p /var/mongodb/db

Does it matter where we have to create that folder?
Do we have to create it in the home directory or it can be any where?
Thanks

It starts with a forward slash. It means it not anywhere. It is at the root just like your c:\ is.

I tried the command and got
$ mkdir -p /var/mongodb/db
mkdir: cannot create directory ‘/var’: Permission denied

Post a screenshot of your issue.

But I suspect, that you are not using the IDE. In the IDE the bash shell is started as root who has the permission to write in /var.

So in case you are not using the IDE, as you should, I will repeat a word of advice:

It will be simpler if you strictly follow lab instructions unless you absolutely know what you are doing.

1 Like

I’m following the instruction steevej. Unfortunately you think it’s clear because you know the stuff.
It doesn’t say “using the IDE…, create a directory …” so I used bash.

@steevej-1495
So it looks like everything has to be done using the provided IDE.
If that’s the case, I will be starting now. I didn’t know.
Thanks

Hi @Alpha_Ly,

Hope you are making progress in the course without any issue now. Let us know if you have any other doubts/questions.

~ Shubham