Install MongoDB in Ubuntu

To install MongoDB in Ubuntu/Debian, run

Configuration file for MongoDB is

To see status of MongoDB, run

To start/stop

Create a User

Now you need to enable authentication, this can be done by editing /etc/mongodb.conf

Uncomment the line

Restart MongoDB

Now you can login with

To verify all works, run some command, for example

On Ubuntu 18.04, default MongoDB version is


Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *