No such file or directory error

I accidentally removed the admin account and decided that the easiest solution was to reinstall mongodb community edition version 6.

After a series of unsuccessful attempts I have managed to get the service running. But when I
$ mongosh

I’m presented with:

-bash: /usr/bin/mongosh: No such file or directory

I’ve been trying to resolve what I thought would be a simple reinstall, for hours.

Somebody. Anybody. PLEASE help. :slight_smile:

Thank you,

Hi @sam_ames,
First verify that it is indeed not there, then run the following command:

find / -iname mongosh

If it is not actually installed you can do:


If your os is centos or rhel


Oh my operating system is Ubuntu 22, how can I install?

Many thanks for your support

Hi @sam_ames,
Depends from the architetture.
I link you the download page:

After you’ve choose the correct link, run the following command from bash:

wget link


Thanks so much.

It looks like I do have it installed but it’s not working when I try
$ mongosh
How do I repair this problem, please advise me


Show us the output of ls -lrt mongosh
Did you try to run it from the bin directory?