I'm trying to install MongoDB on Jessie. (Never used MongoDB before).

Following this tutorial I did the following:

apt-get update
apt-get upgrade
apt-get install mongodb-server -y
service mongod start

But that gives me this error:

Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.

What am I doing wrong?

I have looked around but can't make heads or tails of what I've found - all other examples seem to be doing far more complicated things to get it started! PS. I'm doing everything as root because I like the simple & dangerous approach :)

2 Answers 2


It shows an error, because the correct service name is mongodb and the tutorial contains a typo.


service mongodb start

and enjoy MongoDB:

$ mongo
MongoDB shell version: 2.4.10
connecting to: test
Server has startup warnings:
Fri Dec 30 19:04:35.967 [initandlisten]
Fri Dec 30 19:04:35.967 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Fri Dec 30 19:04:35.968 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
Fri Dec 30 19:04:35.968 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
Fri Dec 30 19:04:35.970 [initandlisten]

Most probably unit mongodb.service is masked. Use following command to unmask it.

sudo systemctl unmask mongodb

then re-run

sudo service mongod start

  • Most probably unit mongodb.service is masked No. If you re-read question and answer then you will see that the cause was a simple typo
    – Dirk
    Commented Nov 21, 2018 at 9:25
  • Santosh is somehow right in my case. I just changed binding IP to and kill the port and when I tried restarting the service it simply failed. When I unmask and restarted the server, it works for em Commented Jun 3, 2020 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.