Database
mongosh
MongoDB Shell
Ubuntu
CentOS
Debian
SUSE
Fedora
RHEL
Verifiziert: 2026-03-04
Syntax
$mongosh [options] [database]
Optionen
--host
--port
--eval
--username
--password
Beispiele
$mongosh
$mongosh mongodb://localhost:27017/database
$mongosh --eval "db.collection.find()"
$mongosh < script.js
Siehe auch
Typische Anwendungsfälle
?
Standardverwendung
mongosh --help
Hinweis
Interaktive MongoDB-Shell. Nachfolger von mongo.
Export