Installing Node.js 12 on Linux Mint 19 with apt

When I have to install anything, I like doing it using apt instead of downloading a tar file. Unfortunately, Node.js isn’t available in any default repo on Mint, so here is how to configure and install it:

Configuring Node.js PPA

First of all, install python-software-properties to better manage your repositories.

sudo apt-get install curl python-software-properties

Then add the latest (as of today) release repo:

curl -sL | sudo bash -

If you want the LTS version, the command is:

curl -sL | sudo bash -

Installing Node.js

Just like any other package:

sudo apt-get install nodejs

Verifying installation

This package also install NPM, só just run the following commands to check the version installed:

node -v
npm -v

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.