1. Introduction

When working with MongoDB, whether we’re seasoned developers or newcomers to NoSQL databases, efficient data handling necessitates a reliable MongoDB client. Robo 3T, formerly known as Robomongo, is a MongoDB tool that offers robust and user-friendly features, ensuring seamless experiences for all users.

In this tutorial, we’ll install Robomongo on Linux using three methods, tailoring them to different user preferences and system setups to ensure operational functionality on our Linux machine. Notably, we’ll need to have administrative privileges for any of these methods.

2. Download and Unzip the Tarball

We can initiate the download process for the most recent Robomongo version directly from the official website or GitHub. We’ll also make sure to fetch the .tar.gz file tailored for Linux, prioritizing a secure and verified source for the download.

2.1. Extract the Contents

Now that we’ve successfully downloaded the Robomongo tarball, let’s extract its contents and organize them appropriately:

$ tar -xvzf studio-3t-linux-x64.tar.gz
studio-3t-linux-x64.sh

This command uses the -xvzf options, where x stands for extract, v for verbose, z for gzip, and f for file. Basically, we’re unzipping the downloaded tarball to access its contents. After extraction, we’ll notice that a script file named studio-3t-linux-x64.sh has been generated.

2.2. Move the Script File

The next essential step is to move this script file to a common system directory.

Let’s create a new directory and move the script to the created directory:

$ sudo mkdir /usr/local/bin/robomongo
$ sudo mv studio-3t-linux-x64.sh /usr/local/bin/robomongo

Using the mkdir command, we’ve created a directory named robomongo in the /usr/local/bin/ path to organize Robomongo’s files. Also, the mv command then moves the script to the newly created robomongo directory.

By executing these commands, we ensure that the Robomongo files are neatly organized in a designated location on our Linux system, making them ready for further configuration and usage.

Now that Robomongo is neatly organized in our system, let’s simplify its execution.

First, let’s create a symbolic link and grant the necessary permissions:

$ cd /usr/local/bin/robomongo
$ sudo ln -s studio-3t-linux-x64.sh robo3t
$ sudo chmod +x robo3t

This link acts as a shortcut, enabling us to run Robomongo effortlessly from any location in the terminal. Firstly, we cd into the /usr/local/bin/robomongo directory. Secondly, we establish a symbolic link named robo3t that points directly to the studio-3t-linux-x64.sh script within our designated robomongo directory. This strategic linking facilitates a more convenient and accessible means of executing Robomongo.

Additionally, the third command, sudo chmod +x robo3t, ensures that the symbolic link’s target is granted executable permissions. This step is crucial for enabling the seamless execution of Robomongo.

Finally, let’s initiate Robomongo and ensure it’s up-to-date:

$ /usr/local/bin/robomongo/robo3t
Unpacking JRE ...
Starting Installer ...
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

This command initiates the startup of Robomongo while automatically checking for updates to ensure that we’re using the latest version. During the setup process, we can toggle on the Create a desktop icon option. Enabling this option facilitates the creation of a desktop icon, providing a quick and convenient way to access Robomongo.

Similarly, we’ll delve into additional installation methods, ensuring a comprehensive guide for diverse user preferences and system setups.

3. Installation via Snap

To streamline our installation process, Snap is a fantastic option. Snap packages include all the necessary dependencies, making the setup straightforward.

Firstly, let’s make sure snapd is available on our machine. snapd is the service responsible for managing Snap packages.

Let’s install snapd:

$ sudo apt install snapd

3.1. Confirm snapd Status

Secondly, after installing snapd, we need to check if the service is up and running:

$ systemctl status snapd.service

○ snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; disabled; preset: disabled)
     Active: inactive (dead)
TriggeredBy: ○ snapd.socket

Based on the output, the snapd service appears to be inactive. However, we’ll get it up and running with the next command:

$ sudo systemctl restart snapd.service

Now, let’s check the status again:

$ systemctl status snapd.service

● snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; disabled; preset: disabled)
     Active: active (running) since Tue 2023-12-26 04:30:13 EST; 4s ago
TriggeredBy: ● snapd.socket
   Main PID: 274403 (snapd)
      Tasks: 9 (limit: 4593)
     Memory: 13.7M
        CPU: 1.897s
     CGroup: /system.slice/snapd.service
             └─274403 /usr/lib/snapd/snapd
...

Notably, snapd is actively running.

3.2. Install Robo 3T

Now that snapd is set up and running, let’s install Robo 3T using the robo3t-snap package:

$ sudo snap install robo3t-snap

The snap command will handle the installation process, and we’ll monitor the progress in the terminal.

3.3. Launch Robo 3T

Once the installation is complete, it’s time to fire up Robo 3T:

$ robo3t-snap

This command initiates the Robo 3T application, and we can observe it starting up.

4. Installation With Desktop Icon

In this method, we’ll take full control of the installation process and create a desktop icon for convenient access.

Following a similar approach to the first method, we initiate the download and extraction of the Robo 3T tar file directly from the official website. Simultaneously, we create a designated path, naming it /usr/local/bin/robo3t. Our chosen installation directory for Robomongo will be within the /usr/local/bin/robo3t/bin/ directory.

4.1. Downloading and Saving the Robo 3T Icon

Now, let’s create a bin directory with the mkdir command:

$ sudo mkdir /usr/local/bin/robo3t/bin

Let’s navigate to the created path using the cd command:

$ cd /usr/local/bin/robo3t/bin

Next, we need to install the Robo 3T icon. So, let’s grab the Robo 3T icon and save it as icon.png:

$ sudo wget https://dashboard.snapcraft.io/site_media/appmedia/2018/09/logo-256x256.png -O icon.png

[sudo] password for risingsegun: 
--2023-12-26 08:24:38--  https://dashboard.snapcraft.io/site_media/appmedia/2018/09/logo-256x256.png
Resolving dashboard.snapcraft.io (dashboard.snapcraft.io)... 185.125.188.61, 185.125.188.62
Connecting to dashboard.snapcraft.io (dashboard.snapcraft.io)|185.125.188.61|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 29341 (29K) [image/png]
Saving to: ‘icon.png
...

The wget command downloads the Robo 3T icon in the /usr/local/bin/robo3t/bin path and saves it as icon.png.

4.2. Create Desktop Entry File

Finally, let’s craft a desktop entry file to facilitate a smooth launch from the desktop:

$ sudo nano /usr/share/applications/robo3t.desktop

This will open the nano text editor, where we can paste the following content into the file and save it:

[Desktop Entry]
Type=Application
Name=Robo3t
Icon=/usr/local/bin/robo3t/bin/icon.png
Exec="/usr/local/bin/robo3t/bin/robo3t"
Comment=Robo3t 
Categories=Development;
Terminal=false
StartupNotify=true

Our desktop file is now set up successfully.

4.3. Validate Desktop Entry

Now, let’s confirm the correctness of our desktop entry file by running the desktop-file-validate command:

$ desktop-file-validate /usr/share/applications/robo3t.desktop

If everything is in order, the command will execute without displaying any output, indicating successful validation.

Finally, for system-wide access, let’s install the desktop entry file with the desktop-file-install command:

$ sudo desktop-file-install /usr/share/applications/robo3t.desktop

Now, we can find Robo 3T on our desktop and fire it up directly.

5. Conclusion

In this article, we’ve walked through three active installation methods for Robo 3T on Linux. From traditional tarball extraction to the streamlined Snap package installation, each method is accompanied by clear instructions. In particular, the manual installation approach, including desktop icon creation, empowers users to enhance accessibility on their Linux machines.

Comments are closed on this article!