Install Node on Linux

Introduction

This guide covers install on Debian based systems (Ubuntu, Linux Mint, etc). If you’re using a different distro, you’ll want to check the install guide on nodejs.org.

Prerequisites

If you do not already have curl installed, you can install it by typing sudo apt install -y curl.

Install

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt update && sudo apt install -y nodejs build-essential

NPM Global Settings

If you don’t already have the ~/.npm directory, create one.

mkdir ~/.npm

Set npm config for the new ~/.npm directory

npm config set prefix '~/.npm'

Install parallelshell and browser-sync NPM packages globally

npm install --global parallelshell browser-sync