install mongodb using bash in mac terminal code example Example: start mongodb server mac mongod --config /usr/local/etc/mongod.conf --fork