node install linux mac

programming/ javascript

This is my brief install instructions for getting started with NodeJS for a linux based OS.

The current recommended method to install node is via the version management tool ‘nvm’ ( This tool allows users to switch between multiple versions of the tool. Ironically, for a version manager you have to specify a version on download. However as it is all managed on a git repository, you just need to pull to get an existing installation up to date.

To get nvm you need may need some tools installed, depending on what OS you are using this can vary (Eg. Ubuntu use apt-get, for Centos use yum, for Mac tools such as Homebrew). For linux based systems, make sure you have wget or curl to download files from the internet via the terminal.

First download and run the install script using command:

curl -o- | bash


wget -qO- | bash

Update v0.NN.NN to the version you wish to download. The latest version can be found at

On running, you will be advised to restart the terminal to enable nvm or you can run command:

. ~/.nvm/`

Once you have nvm installed and active, you should be able to use it to pick up versions of Node. Install a version of node using:

nvm install <version>

When node has been installed, you can check your node version using terminal command:

node -v

The node installation also installs npm (the package manager). You can confirm the version of this using the terminal command:

npm -v

And viola, you should have a managed version of NodeJS installed with NPM.