A working install of Ubuntu 18.04 with root privileges
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user
MongoDB is a NoSQL database that's gereally thought of as being more nimble than SQL options. Because of this, it pairs well with NodeJS based applications.
MongoDB is available in Ubuntu's repositories, but it's already outdated. So, it's better to install it directly from MongoDB's repositories. Begin by adding MongoDB's key.
There is a way to set this all up manually, but it takes more time that you'd ideally want when setting up a new project. Thankfully, there is a more convenient way to install and set everything up with Git and NPM. So, begin by cloning the mean.io repository where you want to build your project.
$ git clone https://github.com/linnovate/mean.git
Next, change into the resulting directory.
$ cd mean
Install MEAN With NPM On Ubuntu 18.04
Use NPM to automatically download and install all of the remaining dependencies and set them up.
$ npm install
Finally, you can use NPM to start up a development server for your project.
$ npm start
MEAN Stack Running On Ubuntu 18.04
You are now running the MEAN stack on your Ubuntu machine!
Obviously, there is a lot more that you need to do, if you want to deploy this into production. This setup is mostly for development purposes. You'll also need to hook up your database for production use as well. Right now, though, you have all the makings needed to get started with the MEAN stack.