When using the mongo shell interactively, there is a handy set of shell command helpers that facilitate discovery and navigation while in the shell. The command helpers are summarized here:
Command | Options | Notes |
use | <dbname> | Switches default database to <dbname> |
help | Displays a list of commands with brief descriptions | |
help | admin | List of administrative commands |
help | connect | Help pertaining to the database connection |
help | keys | Keyboard shortcuts |
help | misc | Other uncategorized help |
help | mr | Displays help on Map-Reduce |
show | dbs | Shows database names |
show | collections | When using a database, shows a list of collections |
show | users | List of users for the current database |
show | logs | List of accessible logger names |
show | log <name> | Displays last entry of log <name>; global is the default |
db.help() | Help on database methods | |
db.<coll>.help() | Help on collection methods, where <coll> is a collection in the currently... |