简体   繁体   中英

where is default installation directory for mongodb

I installed mongodb by following the instructions from its site. To open the shell I must go to the installation directory of mongodb, and then type

./bin/mongo

I don't know the default directory. where might it be?

Late to the party but it could help others: I installed mongodb 3.4.10 for Ubuntu 16.4

I found the mongo file to launch the shell at

/usr/bin/mongo

I found it using the following commands

sudo updatedb
locate -b '\mongo'

Use the which mongo command to look for the location of the mongo executable.

Windows: c:\Program Files\MongoDB\Server\3.4.7\bin\mongod

Mac: /usr/local/Cellar/mongodb/3.4.7/bin/mongod

Replacing the 3.4.7 with your version of Mongodb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM