Cmd bash mongo command not found

after successfully installing Mongodb on my distro, cmd mongo it says bash: mongo: command not found
While Mongdb is successfully installed

 mongodb.service - MongoDB Database Server
     Loaded: loaded (/usr/lib/systemd/system/mongodb.service; enabled; preset: disabled)
     Active: active (running) since Fri 2023-06-30 14:48:53 +0545; 17min ago
   Main PID: 1134 (mongod)
     Memory: 155.3M
        CPU: 6.686s
     CGroup: /system.slice/mongodb.service
             └─1134 /usr/bin/mongod --config /etc/mongodb.conf

Jun 30 14:48:53 diyash-nitroan51555 systemd[1]: Started MongoDB Database Server.
Jun 30 14:48:53 diyash-nitroan51555 mongod[1134]: {"t":{"$date":"2023-06-30T09:03:53.710Z"},"s":"I",  "c":"CONTROL",  "id":7484500, "ctx":"-","msg":"Environment variable MONGODB_CONFIG_OVER>
lines 1-12/12 (END)

$ mongosh perhaps?


just started to learn to use mongo as a beginner so I don’t know how to use it…

[diyash@diyash-nitroan51555 ~]$ mongosh
Current Mongosh Log ID:	649ea7528244c9674967b178
Connecting to:		mongodb://
Using MongoDB:		6.0.6
Using Mongosh:		1.10.1

For mongosh info see:

   The server generated these startup warnings when booting
   2023-06-30T14:48:53.753+05:45: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See
   2023-06-30T14:48:54.311+05:45: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
   2023-06-30T14:48:54.311+05:45: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
   2023-06-30T14:48:54.311+05:45: Failed to read /sys/kernel/mm/transparent_hugepage/defrag


Me either!

I have actually never used it but if I were to, I would start here:

Mongodb has been already installed now don’t know how to use it . Anyway thanks @pebcak for recommending me.

I see in the manual that after the section for installation come, what to me looks like, instructions for usage.

Anyway, I am sure you will figure it out and hopefully other forum members will point you into the right direction.

Good luck!

1 Like

Thanks man have a good day

1 Like

Done mongodb and mongodb compass successfully running on server.

There was nothing to do after installing MongoDB gets install u just needed to use cmd
mongosh for connecting it with MongoDB server and install mongodb compash .

Here is how I installed MongoDB on my distro

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.