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 o…


This content originally appeared on DEV Community and was authored by Naseel Niyas

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!


This content originally appeared on DEV Community and was authored by Naseel Niyas


Print Share Comment Cite Upload Translate Updates
APA

Naseel Niyas | Sciencx (2021-04-22T18:12:39+00:00) Install node using NVM in under 3 mins. Retrieved from https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/

MLA
" » Install node using NVM in under 3 mins." Naseel Niyas | Sciencx - Thursday April 22, 2021, https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/
HARVARD
Naseel Niyas | Sciencx Thursday April 22, 2021 » Install node using NVM in under 3 mins., viewed ,<https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/>
VANCOUVER
Naseel Niyas | Sciencx - » Install node using NVM in under 3 mins. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/
CHICAGO
" » Install node using NVM in under 3 mins." Naseel Niyas | Sciencx - Accessed . https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/
IEEE
" » Install node using NVM in under 3 mins." Naseel Niyas | Sciencx [Online]. Available: https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/. [Accessed: ]
rf:citation
» Install node using NVM in under 3 mins | Naseel Niyas | Sciencx | https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.