Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 22, 2021 06:12 pm GMT

Install node using NVM in under 3 mins

Hey There!

This article is about installing Node on a Unix/Linux based system. We are using NVM to do this

You can also follow this video by me....(Don't forget to subscribe!)

This guide can be followed on: > 1) Linux based distributions like Ubuntu, Debian, Red Hat, Fedora > 2) Unix distros MacOS ... etc.

Step 1

Visit https://github.com/nvm-sh/nvm to visit nvm's github repository Image "Nvm github"

Now we can scroll down untill we find a list of commands Installation commands

Step 2

Now, we just have to run these commands.

Command 1: Use curl/Wget to run the Install/Update script.
Using Curl:


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

Using Wget:

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

We have to export some ENV (Enviornment variables)... Run these 2 commands


export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"

sh [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

Step 3

Use NVM to install Node!

Now we have successfully installed NVM. Time to use It.

To install the latest LTS version of node, run:


nvm install --lts

To install latest version of node, Run:


nvm install node

To install a specific version of node, run:


nvm install 12.0.0 # This istalls node v12.0.0

To use a specific version:


nvm use 12.0.0 # Uses node v12.0.0

That's It! Now you have node running on your system!

Encountered an error? Comment below!

Original Link: https://dev.to/naseelniyas/install-node-using-nvm-in-under-3-mins-2djk

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To