This quick tutorial guides you to install Node.js on any Debian-based linux distro.

(01) Update the packages index on your distro.

$ sudo apt update

(02) Install NPM.

$ sudo apt install npm -y

(03) Install n package using NPM.

$ sudo npm install n -g -y

(04) Using n package, install any Node.js version of your choice.

// node stable version
$ sudo n stable

// node latest version
$ sudo n latest

// node v10.x
$ sudo n 10.15.3

// node v12.x
$ sudo n 12.14.1

// node v13.x
$ sudo n 13.5.0

👉 Any questions? Please comment below.


Leave a comment