Where the mongodb default database folder on linux, check the mongod.conf

Where the mongodb default database folder on linux, check the mongod.conf


cd /etc/mongod.conf
And it will say, Where and how to store data:
/var/lib/monogo

Example of monogo.conf default mongodb on linux(Ubuntu):


# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
#  engine:
  mmapv1:
    smallFiles: true
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1

#processManagement:

#security:

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options:

#auditLog:

#snmp:


On Windows: example c:\data\db