Installing MongoDB & mongosh Setup
To use MongoDB locally, you must install the community server and use the MongoDB Shell (mongosh) command line utility.
1 Running mongosh Commands
Shell — Terminal Access
# Login to local database server
mongosh
# List all existing databases
show dbs
# Create/Select a database
use library
# Show current active database
db
2 Code Challenge
Challenge: Install MongoDB locally or create a free MongoDB Atlas cloud cluster. Connect to the server using
mongosh, and create a database named shop_db.