start mongodb on startup ubuntu code example Example: ubuntu start mongodb sudo mongod --fork --config /etc/mongod.conf