MongoDB (3.2) doesn't start on Lubuntu 16.04 LTS as a service

The instructions/packages on the MongoDB site are currently available for LTS Ubuntu 12.04 and 14.04 only. The packages are set up to use upstart instead of systemd. You need to create a systemctl file to be ready for systemd. Create it by

sudo nano /etc/systemd/system/mongodb.service

It will look like

[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

Now you can start the service and check its state by

sudo systemctl start mongodb
sudo systemctl status mongodb

and finally enable it permanently by

sudo systemctl enable mongodb

(Source: How to Install MongoDB on Ubuntu 16.04)


Just run sudo mongod to start the daemon and then sudo mongo to access the shell