UbuntuUbuntu Based

How To Install MongoDB Compass on Ubuntu 24.04 LTS

Install MongoDB Compass on Ubuntu 24.04 LTS

In this tutorial, we will show you how to install MongoDB Compass on Ubuntu 24.04 LTS. MongoDB has emerged as a leading NoSQL database solution, renowned for its scalability, flexibility, and high-performance capabilities. While the command-line interface offers a powerful way to interact with MongoDB, many developers prefer the convenience and user-friendly experience of a graphical user interface (GUI) tool like MongoDB Compass. MongoDB Compass is a robust and intuitive GUI that simplifies working with MongoDB databases. It provides a visually appealing interface for querying, exploring, and optimizing data, making it an invaluable tool for developers, database administrators, and data analysts alike.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of MongoDB Compass on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 24.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • At least 4 GB of RAM and 20 GB of free disk space.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  •  A stable internet connection is required to download and install MongoDB Compass.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Install MongoDB Compass on Ubuntu 24.04 LTS

Step 1. Updating the Package Repository.

Keeping your system packages up-to-date is a best practice that not only enhances security but also ensures compatibility with the latest software versions. To update your system packages, open a terminal and run the following commands:

sudo apt update
sudo apt upgrade

This command will update the package lists and upgrade any outdated packages on your system. It’s a good idea to perform this step before proceeding with the MongoDB Compass installation.

Step 2. Installing MongoDB Compass on Ubuntu 24.04.

To ensure the authenticity and integrity of the MongoDB packages, you’ll need to import the official MongoDB public GPG key. This key is used to verify the digital signatures of the packages, ensuring that they haven’t been tampered with during the download process.

First, install the required packages for importing the GPG key:

sudo apt install gnupg curl

Next, import the MongoDB public GPG key using the following command:

curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-6.0.gpg

To install MongoDB Compass, you’ll need to add the official MongoDB repository to your system’s package sources list. This repository contains the latest versions of MongoDB Compass and other related packages.

Run the following command to add the MongoDB repository:

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

After adding the repository, update your package cache by running:

sudo apt update

With the repository added and the package cache updated, you’re now ready to install MongoDB Compass. Run the following command:

sudo apt install mongodb-compass

This command will download and install the latest version of MongoDB Compass from the official repository. During the installation process, you may be prompted to confirm the installation or accept any dependencies. Follow the on-screen instructions to complete the installation.

It’s important to note that MongoDB Compass is a standalone GUI tool and does not require the MongoDB server to be installed on the same machine. However, if you plan to work with a local MongoDB instance, you’ll need to install the MongoDB server separately.

To install the MongoDB server, run the following command:

sudo apt install mongodb-org

Step 3. Launch MongoDB Compass on Ubuntu.

After a successful installation, you can launch MongoDB Compass from the graphical user interface (GUI) menu or by searching for “MongoDB Compass” in the application launcher.

When you open MongoDB Compass for the first time, you’ll be greeted with a clean and intuitive interface. From here, you can connect to a local or remote MongoDB instance by providing the appropriate connection string and credentials.

Install MongoDB Compass on Ubuntu 24.04

Congratulations! You have successfully installed MongoDB Compass. Thanks for using this tutorial for installing MongoDB Compass on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the MongoDB website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button