Cant use mongo command, shows command not found on mac

4.9K    Asked by RickNovak in Data Science , Asked on Jul 15, 2021

 I am using Mac Lion. I was using mongodb version 1.4. I wanted to upgrade to 1.8.5 I followed stepwise replacing each mongodb-Osx-x86_64-1.4.0 by mongodb-Osx-x86_64-1.8.5. everything goes smooth. I tried:


its ok. I can access localhost:28017 but,


shows command not found

how I can I fix this

Answered by Parth Joshi

To get rid of the mongo command not found, add the path to "mongo" to your terminal shell.

    export PATH=$PATH:/usr/local/mongodb/bin

Your Answer


Parent Categories