>_ linuxcommand.dev
Startseite mongosh
Database

mongosh

MongoDB Shell

Ubuntu CentOS Debian SUSE Fedora RHEL
Verified: 2026-03-04
Syntax
$mongosh [options] [database]
Optionen
--host
--port
--eval
--username
--password
Examples
$mongosh
$mongosh mongodb://localhost:27017/database
$mongosh --eval "db.collection.find()"
$mongosh < script.js
Typical use cases
?
Standard usage
mongosh --help
Note Interactive MongoDB Shell. Successor of mongo.
Export