TL;DR: Mongosh is the bundled, default shell for Studio 3T.
If you haven’t set your preferred MongoDB Shell in Studio 3T or use only Studio 3T bundled Mongo shells, your Studio 3T automatically updates to the new default MongoDB Shell.
If you previously set your preferred MongoDB Shell to anything that was not a Mongo shell bundled with Studio 3T, Studio 3T will not change your settings, but we do advise that you review your configuration.
Why the change in Studio 3T to mongosh?
Studio 3T traditionally bundled three MongoDB tools in its downloadable installer. These were:
mongo
– the mongo shellmongodump
– the database dump utilitymongorestore
– the database restore utility.
MongoDB introduced a replacement for mongo, the mongo shell, called mongosh, which has replaced the older, legacy shell code with a modern Node.js application while retaining the user interface and compatibility with the legacy mongo shell.
Studio 3T is able to support both the legacy mongo shell and newer mongosh.
What changes with mongosh?
Most users will notice no difference between the two shells when using Studio 3T. This is because Studio 3T’s IDE wraps the shell in an advanced GUI that already provides autocompletion, tabular, tree, and JSON views of results, inline editing, and more.
In Studio 3T 2022.9, we introduced Query Assist support when using the bundled mongosh shell.
Advanced mongo script users making use of the legacy MongoDB shell’s native JavaScript functions may have to change some of their JavaScript function calls to use the newer Node.js-based environment. These users will also gain access to the more extensive library of features in the new mongosh, including standardized file and network support.
Using the legacy shell
It is still possible to use the legacy MongoDB shell. Studio 3T retains support for it and continues to bundle the last major version of it with the Studio 3T installer. Users are also free to install earlier versions of the shell if needed.
You can also change to the legacy shell by selecting the Use Legacy Shell toggle button in IntelliShell. This switches the shell from bundled mongosh to bundled mongo (or back to mongosh from mongo) in the current IntelliShell session.
If you want to make that change permanent, you can configure the shell through the global preferences or per-connection settings as detailed in Configure mongodump, mongorestore and mongo shell executable files in the Knowledge Base.
It is worth noting that MongoDB no longer maintains or distributes the legacy mongo shell for newer platforms, and as such it may not be available – for example – on Ubuntu 22.04LTS. Mongosh is supported on these platforms though.
Older MongoDB Servers ( < 3.6 ) and mongosh in Studio 3T
If you are connecting to a MongoDB server before version 3.6, you will have to configure your connections to use the legacy mongo shell. This is because the newer mongosh does not work with servers of that vintage.