0

I installed MongoDB on my Macbook (Catalina 10.15.3) and placed all the necessary entries in my .bash_profile. However, these entries are not recognized, so I have to manually enter the following again and again in order to start MongoDB (for each new terminal):

export MONGO_PATH=/Users/codehan/Desktop/MongoDB/mongodb-macos-x86_64-4.2.3
export PATH=$MONGO_PATH/bin:$PATH

Otherwise I always get the following in the terminal:

zsh: command not found: mongo

But as soon as I enter export MONGO_PATH=/Users/codehan/Desktop/MongoDB/mongodb-macos-x86_64-4.2.3 and export PATH=$MONGO_PATH/bin:$PATH in my terminal it works again.

How can I fix this problem?

Codehan25
  • 2,704
  • 10
  • 47
  • 94

1 Answers1

0

With zsh, the configuration file is $HOME/.zshrc

Philippe
  • 20,025
  • 2
  • 23
  • 32