Fastest way to install NodeJS on Ubuntu

Step 1: Choose version you want to install

Step 2: Download suitable version (x64 or x86)


Step 3: Install

sudo tar -C /usr/local --strip-components 1 -xzf node-v6.10.2-linux-x64.tar.gz  


node -v # => v6.10.2  
npm -v # => 3.10.10  


Update npm to latest version

sudo npm i -g [email protected]  

Install build-essentials package

In order for some npm packages to work (such as those that require building from source), you will need to install the build-essentials package:

sudo apt-get install build-essential