Install Node and NPM using NVM in Mac or Linux (Ubuntu)

Lucas Kardonski
Apr 11 · 1 min read

**Pre requisites: In Mac. Make sure you have xcode installed**

curl --version

Install NVM using curl

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

Either run the command that will pop up, or close and reopen your terminal to start using nvm run

nvm --version

to make sure you got the right version of nvm installed correctly run

nvm install node 

Now install node.

//to install the latest version
nvm install node
nvm use node
//to install a specific version number
nvm install 8.9 //to install node 8.9
nvm use 8.9
//to install the LTS version
nvm install --lts
nvm use --lts

You can install any number of versions of node and switch between versions at any time by running

nvm use desired-version

Now make sure npm was installed by running

npm -v

Your set. Happy Coding!

Lucas Kardonski

Written by

Entrepreneur, MBA, Business Dev for Torus Digital

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade