Step-by-Step Guides์ถœ์ฒ˜: DigitalOcean์กฐํšŒ์ˆ˜ 2

How To Use the MongoDB Shell

By Mateusz Papiernik
2026๋…„ 2์›” 25์ผ
**How To Use the MongoDB Shell**

Introduction The MongoDB Shell, called mongosh, is the officially supported command-line interface for working with MongoDB. It allows you to connect to a MongoDB server, run queries, insert and update documents, manage indexes, and execute JavaScript directly against your database. If you are running MongoDB locally or using MongoDB Atlas in the cloud, mongosh provides a consistent way to interact with your data. It replaces the legacy mongo shell and introduces a modern, improved experience built on Node.js. In this guide, you will learn how to connect to local, remote, and MongoDB Atlas deployments, navigate and explore databases using the shell, perform CRUD operations with modern helper methods, use query operators and projections effectively, sort and paginate results, create and manage indexes, execute JavaScript directly inside the shell, and troubleshoot common connection and authorization issues that arise in real-world environments...

---

**[devsupporter ํ•ด์„ค]**

์ด ๊ธฐ์‚ฌ๋Š” DigitalOcean์—์„œ ์ œ๊ณตํ•˜๋Š” ์ตœ์‹  ๊ฐœ๋ฐœ ๋™ํ–ฅ์ž…๋‹ˆ๋‹ค. ๊ด€๋ จ ๋„๊ตฌ๋‚˜ ๊ธฐ์ˆ ์— ๋Œ€ํ•ด ๋” ์•Œ์•„๋ณด์‹œ๋ ค๋ฉด ์›๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.