1. Connection URI
mongosh opens an interactive shell against the connection string; mongodb://host:port points at the server.
mongosh "mongodb://localhost:27017"Typorithm · easy
Step 1 of 8 · intro card
mongosh
Start mongosh against a connection URI, then use show dbs, use <db>, and show collections to move around the server.
mongosh is the modern MongoDB shell; you launch it with a connection string like mongodb://localhost:27017.
Once connected, show dbs lists the databases and use <db> sets the one your commands operate on.
show collections then reveals the collections inside the current database so you know what you can query.
mongosh <uri> opens the shell.
show dbs lists databases.
use <db> switches the current database.
mongosh "mongodb://localhost:27017"
show dbs
use shop
show collectionsConnect each part of the code to the concept before you type.
mongosh opens an interactive shell against the connection string; mongodb://host:port points at the server.
mongosh "mongodb://localhost:27017"show dbs lists the databases on the server along with their on-disk size.
show dbsuse <db> selects the current database; the named db is created lazily on first write.
use shopshow collections lists the collections inside the database you are currently using.
show collectionsRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.