DEV Community

Naseel Niyas
Naseel Niyas

Posted on

2 2

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!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay