This quick tutorial guides you to install Node.js 10/12/13 on any linux machine.

Debian, Ubuntu, Mint, Devuan, elementary OS, Trisquel, BOSS, BunsenLabs, MX Linux, Sparky Linux

Node.js v13.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get install -y nodejs

Node.js v12.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

Node.js v10.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

CentOS, RHEL, CloudLinux, Fedora

Node.js v13.x:

# As root
curl -sL https://rpm.nodesource.com/setup_13.x | bash -

# No root privileges 
curl -sL https://rpm.nodesource.com/setup_13.x | sudo bash -

Node.js v12.x:

# As root
curl -sL https://rpm.nodesource.com/setup_12.x | bash -

# No root privileges 
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -

Node.js v10.x:

# As root
curl -sL https://rpm.nodesource.com/setup_10.x | bash -

# No root privileges 
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -

✅ Tested OS's : RHEL 7+, CentOS 7+, Ubuntu 18.04+, Debian 8+
✅ Tested Gear : Cloud (AWS EC2), On-Prem (Bare Metal)

👉 Any questions? Please comment below.


Leave a comment