Source ~/.bash_profile error

I’m trying to install MongoDB shell and following the instructor, but getting an error. Any help would be appreciated, thanks!

Nitishs-MBP:~ nitishranjan$ echo $PATH


Nitishs-MBP:~ nitishranjan$ source ~/.bash_profile

Nitishs-MBP:~ nitishranjan$ echo $PATH


Nitishs-MBP:~ nitishranjan$ mongo --nodb

-bash: mongo: command not found

Nitishs-MBP:~ nitishranjan$

Hi @Nitish_23950,

Please try to run the following command in the command line:

cat .bash_profile

Please share the screenshot of the output of above command.

Here the bin folder of the mongodb enterprise server is not added in the path.

Please recheck the path and let me know, if you have any questions.


Hi Sonali,
Thank you for the instant reply. I really appreciate it. I just figured it out, I already had a .bash_profile, and I also created a new one.
I open the default .bash_profile using the command $ open .bash_profile in the terminal then added export PATH="~/mongodb-osx-x86_64-enterprise-4.0.10/bin:$PATH" and saved.


1 Like