List all collections in mongo shell

In mongo shell, how to list all collections?

We can use the following method in the mongo shell to list all the collections in the currently selected database:
>db.getCollectionNames()

Also, can use the following command to do the same:
>show collections

This topic is now closed. New replies are no longer allowed.

This topic is now unlisted. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.

This topic is now opened. New replies are allowed.

This topic is now listed. It will be displayed in topic lists.

This topic is now closed. New replies are no longer allowed.