MongoDB – NoSQL Database – all locations
In order to find in MongoDB the whole paths, you can go into the mongoshell with
mongosh
It is possible that you see this message, but you can ignore it:
sven@fedora:~$ mongosh
Current Mongosh Log ID: 68833ee8dc64789649384af8
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.6
Using MongoDB: 7.0.22
Using Mongosh: 2.5.6
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
The server generated these startup warnings when booting
2025-07-25T04:36:15.431+02:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
and type the command:
db.serverCmdLineOpts()
then you get the following output:
test> db.serverCmdLineOpts()
{
argv: [ ‚/usr/bin/mongod‘, ‚-f‘, ‚/etc/mongod.conf‘ ],
parsed: {
config: ‚/etc/mongod.conf‘,
net: { bindIp: ‚127.0.0.1‘, port: 27017 },
processManagement: { timeZoneInfo: ‚/usr/share/zoneinfo‘ },
storage: { dbPath: ‚/var/lib/mongo‘ },
systemLog: {
destination: ‚file‘,
logAppend: true,
path: ‚/var/log/mongodb/mongod.log‘
}
},
ok: 1
}