Mongodb – How to list all databases in the mongo shell

databasemongodbmongodb-query

I know how to list all collections in a particular database, but how do I list all available databases in MongoDB shell?

Best Answer

Listing all the databases in mongoDB console is using the command show dbs.

For more information on this, refer the Mongo Shell Command Helpers that can be used in the mongo shell.

Related Question