These instructions are for mac, tweak as necessary!
Install it
In a terminalbrew update brew install mongodb
Start it
Then open a terminal and start itmongod
Open it
Open another terminal and open a mongo shellmongo
Query it
You should now be in a mongo shell, to view dbs, collections etc... typeshow dbs use whicheverdbyouwant db show collectionsTo find out where the logs, db and config is type in...
db.getSiblingDB("admin").runCommand({getCmdLineOpts:1})And for basic query, presuming you have a users collection, count all users starting with S
db.users.find( {"userName": /^S/ } ).count()