Installing Node.js 12 on Linux Mint 19

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 https://deb.nodesource.com/setup_12.x | sudo bash -

If you want the LTS version, the command is:

curl -sL https://deb.nodesource.com/setup_10.x | 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

Cleiver

I'm Cleiver, I'm 35, I'm a software developer and I'm too lazy to write a better description

Write your comment…

Be the first one to comment