MongoDB service cannot be found in service list

I have instructions from this link https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

And when I'm going

sudo service mongod start

      

it shows up as an unrecognized service

I knew I might need to use mongodb instead of mongod, but it's the same.

Then I checked the list of all services on

service --status-all

      

There is no mongodb related service listed

I reinstalled it again and it is the same. I have also searched the internet and I cannot find a solution. I am installing ubuntu bash on windows. I reinstall bash once before this problem (14.04 to 16.04). Last time I installed it, before reinstalling bash, it works fine.

Thanks in advance for your answers.

+3


source to share


1 answer


I faced the same problem. I don't know the reason and solution, but you can check the status of the mango itself with this command:

sudo service mongod status

      



You can see something like this output:

root@lab# service mongod status
● mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-04-06 09:47:57 BST; 1min 31s ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 5973 (mongod)
   CGroup: /system.slice/mongod.service
           └─5973 /usr/bin/mongod --quiet --config /etc/mongod.conf

      

0


source







All Articles