I think I have it figured out.

  1. Make sure you have your mongosh folder within program files. Previously the OP said they placed the shell in the bin with the other MongoDB downloads. This should be fixed and you can do it by simply dragging the shell into program files.
  2. Make sure you copy and paste the shell’s new address and set it up in the environmental variables.
  3. If you are following the udemy course, you would have had two aliases already in vim .bash_profile. Add another alias for mongosh in the same manner as the previous two aliases. ie. write alias mongod=“/c/Program\ files/MongoDB/Server/7.0/bin/mongod.exe”. (This is for version 7.0 of MongoDB).
  4. Now you should be able to run it with gitbash by writing mongod and then mongosh.

Just writing this here because I had similar problems with the mongosh shell in a vs code terminal. This was the solution I mustered up after thinking about how to solve the problem for a while.