- It is a component of MongoDB
- In windows to use mongo shell find mongo.exe and run it.
- To start or work on the shell you need to start mongod.exe which is present on installation path of C:\Program Files\MongoDB\Server\4.0\bin
Mongodb shell commands you can found on this link
Help to get help and show commands on the console
Shortcut to clear mongo screen ctrl + l
- List of databases: show DBS
Show the collections in databases use: Show collections
If your DB is not selected then it showing blank for that you can first select the database by using this command Use database databasename / use database name to select the database.
Use DatabaseName:- this command is used to switch the database if already present else it will create the database for you. But when you used show DBS command after that it will not show the newly created database. For this purpose, we have to add collection into that newly created database.
- Default collection created by mongodb is system.Indexes.