Unable to complete Mongo DB Shell installation in Mac OS

I have placed the mongo db shell installation (extract folder) file inside the home directory.

below is my .bash_profile (which I created) set up looks like:
export PS1=’$ ’

export PATH="~/mongodb-macos-x86_64-enterprise-4.2.0/⁨bin:$PATH"⁩

I ran the below commands from Terminal
$ open -e .bash_profile

$ source ~/.bash_profile

$ echo $PATH


$ mongo --nodb

-bash: mongo: command not found

Please advise on why I am getting command not found instead of mongo version. I restarted my system as well. but didn’t work.

Please check ls -la ~/.bash_profile
Your mongodb path is repeating in your output
Check our forum.Many threads available on setting PATH in macos

or try from command line
export PATH="~/your_mongodb_version/⁨bin:PATH"⁩ then source the .bash_profile or PS1=’ ’ don’t use quotes as suggested in some threads

Hi @SakthiPriya_76703,

Please refer this post for the steps to set up mongo shell on your Mac OS.

If you still face any issue, feel free to get back to us. Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer