Installation issue for mongodb 6

I used the following link to install mongodb on my system Ubuntu 20.04 LTS focal.

After installation, I ran “mongo” commad and got the following:

Command 'mongo' not found, but can be installed with:
sudo apt install mongodb-clients

I checked this “whereis mongo”. And the result was empty. I also noticed that the folder “mongo” is missing in /usr/bin.

Please help. Have already wasted 2 hour in this. How do I fix this?

The command mongo, in principal,

I wrote in principal because mongo has been replaced by mongosh, so the command above probably install mongosh rather than mongo.


As steevej states, the mongo tool is not included in the download of MongoDB 6.0. You will want to download the mongosh shell now if you wish to interface with the database from the command line. For the most part anything that you could do in the older mongo command line can be done in the newer mongosh tool.


Got it. Thanks for the help. Used mongosh.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

Hi folks,

In addition to the Download Center option mentioned by @Doug_Duncan, there is a mongodb-mongosh package that can be installed per Install MongoDB Community Edition on Ubuntu.

If you installed the default mongodb-org Ubuntu metapackage for MongoDB 5.0+ (per the installation steps above), I believe mongodb-mongosh should be included by default.