Home > OS >  mongosh is a valid command but mongo is not found
mongosh is a valid command but mongo is not found

Time:08-17

I have mongodb community 6.0.0 installed.

The command mongo is not found.

The command mongosh is working.

mongosh --version
1.5.4

CodePudding user response:

According to official document,

The mongo shell has been deprecated in MongoDB v5.0. The replacement is mongosh.

As you are using MongoDB v6.0, mongo is deprecated in your version.

CodePudding user response:

You need to add the path to "mongo" to your terminal shell.

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