Start mongod service at system startup

Diego picture Diego · Nov 15, 2016 · Viewed 15.1k times · Source

I recently updated mongodb, and I run Linux Mint (an Ubuntu based system) and every time I start it up, i cannot use Robomongo because the service mongod is not automatically started; every time I need to open up a terminal and use

sudo service mongod start

Is there a way to start mongod automatically at system start?

Answer

Yeshu Kochher picture Yeshu Kochher · Jan 2, 2018

Use the following command to autostart mongodb when system start.

systemctl enable mongod.service