Node.js® is an amazing JavaScript runtime, permitting scalable network applications

In this guide, I will explain how to install Node.js, on most major operating systems.

Installing Node.js

Is your Operating System Missing?


Installing Node.js

This guide to installing node.js attempts to be very quick and easy.  Select what operating system you are using, and the install instructions are available.

Installing Node.js in Windows

In Microsoft Windows, you can use Node.js by downloading the Windows Installer directly from the nodejs.org website.  Alternatively, if you use Chocolatey Package Manger or Scoop command-line installer, see the instructions below.

  • Using Chocolatey package manager
    cinst nodejs or if you want a full install with npm cinst nodejs.install
  • Using Scoop command-line installer
    scoop install nodejs

Installing Node.js in Arch Linux

  • Node.js can be installed in Arch Linux through the Community Repository
    pacman -S nodejs npm

Installing Node.js in Debian / Ubuntu

Node.js can be installed on Debian and Ubuntu Distributions through the packages managed by nodesource.  Check if you are supported below, and install Node.js by Version here.

Node.js supports the following versions of Ubuntu:

  • Ubuntu 14.04 LTS (Trusty Tahar) doesn't support Node.js 10+
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Ubuntu 18.04 LTS (Bionic Beaver)
  • Ubuntu 18.10 (Cosmic Cuttlefish)

Node.js supports the following versions of Debian:

  • Debian 8 / oldstable (Jessie)
  • Debian 9 / stable (Stretch)
  • Debian 10 / testing (Buster)
  • Debian unstable (Sid)

Node.js supports the following versions of Linux Mint:

  • Linux Mint 17 "Qiana" doesn't support Node.js 10+
  • Linux Mint 17.1 "Rebecca" doesn't support Node.js 10+
  • Linux Mint 17.2 "Rafaela" doesn't support Node.js 10+
  • Linux Mint 18 "Sarah"
  • Linux Mint 18.1 "Serena"
  • Linux Mint 18.2 "Sonya"
  • Linux Mint 18.3 "Sylvia"
  • Linux Mint 19
  • Linux Mint Debian Edition (LMDE) 2 "Betsy"

Node.js supports the following versions of Devuan:

  • Jessie
  • Ascii
  • Ceres

Node.js supports the following versions of elementary OS:

  • elementary OS Freya doesn't support Node.js 10+
  • elementary OS Loki
  • elementary OS Juno

Node.js supports the following versions of Trisquel:

  • Trisquel 7 "Belenos"
  • Trisquel 8 "Flidas"

Node.js supports the following versions of BOSS:

  • BOSS 5.0 "Anokha" doesn't support Node.js 10+
  • BOSS 6.0 "Annop"

Node.js supports the following versions of BunsenLabs:

  • Hydrogen
  • Helium

Installing Node.js By Version

Node.js v11.x

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

Using Debian, as root
curl -sL https://deb.nodesource.com/setup_11.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

Node.js v8.x

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

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

Node.js v6.x

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

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

Installing Node.js in CentOS / Fedora

Node.js can be installed on CentOS / Fedora / EPEL Distributions through the packages managed by nodesource.  Check if you are supported below, and install Node.js by Version here.

Node.js supports the following versions of RHEL:

  • RHEL 6
  • RHEL 7

Node.js supports the following versions of CentOS:

  • CentOS 6
  • CentOS 7

Node.js supports the following versions of CloudLinux:

  • CloudLinux 6

Node.js supports the following versions of Fedora:

  • Fedora 27
  • Fedora 28
  • Fedora 29

Installing Node.js on EL By Version

Node.js v11.x

curl -sL https://rpm.nodesource.com/setup_11.x | bash -

Node.js v10.x

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

Node.js v8.x

curl -sL https://rpm.nodesource.com/setup_8.x | bash -

Node.js v6.x

curl -sL https://rpm.nodesource.com/setup_6.x | bash -

Installing Node.js in Gentoo

  • On Gentoo, Node.js can be installed with the portage tree
    emerge nodejs

Installing Node.js in NetBSD / FreeBSD / OpenBSD

  • Node.js is available on NetBSD through pkgin:
    pkgin -y install nodejs
  • Node.js can be installed on FreeBSD through the www/node port:
    pkg install node
  • Node.js can be installed on OpenBSD through ports:
    /usr/ports/lang/node
  • With pkg_add
    pkg_add node

Installing Node.js in Android

Andoid supports Node.js, but it's still experimental.  Using the Termux terminal emulator, you can install Node.js as follows:
pkg install nodejs

Currently, the Node.js binaries are linked against system-icu, requiring libicu

Installing Node.js in macOS

macOS has a native installer from the nodejs.org website.  Alternatively:

  • Using Bash
    curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.>node-(.).pkg.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
  • Using Homebrew
    brew install node
  • Using MacPorts
    port install nodejs8 or port install nodejs[MAJOR_VERSION]
  • Using pkgsrc
    pkgin -y install nodejs

Is your Operating System Missing?

We do our very best to provide complete and accurate information.  If your operating system or environment is missing, please sent us a request in the comments.