The MongoDB Shell

Learn how to use the MongoDB Shell to interact with local and remote MongoDB databases. In addition to learning the basics of MongoDB Shell, you'll learn how to customize it based on your needs.

The MongoDB Shell

Unit Overview

In this unit, you'll learn about the MongoDB Shell (mongosh), the command line interface that enables you to interact with local and remote MongoDB deployments. You'll learn how to install mongosh and connect to both Atlas and self-managed deployments. Next, you'll learn how to configure and use mongosh along with its companion library (.mongoshrc.js). Finally, you'll learn some tips and tricks for working with mongosh.

Prerequisites

Lessons in This Unit

  • Lesson 1 – Installing and Connecting to the MongoDB Shell
  • Lesson 2 – Configuring the MongoDB Shell
  • Lesson 3 – Using the MongoDB Shell
  • Lesson 4 – Using the MongoDB Shell Library (.mongoshrc.js)
  • Lesson 5 – MongoDB Shell Tips and Tricks
  • 01.
    Lesson 1: Installing and Connecting to the MongoDB Shell
    • Learn
    • Practice
  • 02.
    Lesson 2: Configuring the MongoDB Shell
    • Learn
    • Practice
  • 03.
    Lesson 3: Using the MongoDB Shell
    • Learn
    • Practice
  • 04.
    Lesson 4: Using the MongoDB Shell Library (.mongoshrc.js)
    • Learn
    • Practice
  • 05.
    Lesson 5: MongoDB Shell Tips and Tricks
    • Learn
    • Practice
  • 06.
    Conclusion
    • Learn
John McCambridge | University Curriculum Engineer

John McCambridge | University Curriculum Engineer

John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.

Vick Mena | Director, Curriculum

Vick Mena | Director, Curriculum

My name is Vick and I've been in the wild for over 25 years. I grew up at IBM working on the BIOS for the IBM eServer line in Austin, TX before moving to Wall St. I've worked on all phases of software development from low-level to middleware to UI but feel most comfortable in the middle. I also drank the devops kool-aid having moved a product line to AWS while at Dow Jones & Co with the help of an amazing team. I then pivoted into the secure space and worked on software/hardware reverse engineering. I always thought I'd eventually teach and this role lets me leverage all of my experience to lead this motley crew of passionate educators.

MR
October 24, 2023 4:46 AM


NS
October 22, 2023 7:14 AM


LO
October 20, 2023 6:53 AM


MT
October 19, 2023 7:28 PM


bb
October 17, 2023 11:39 AM


AT
October 16, 2023 11:56 AM