---
title: "Discussion on \"Setting up Nodejs with nvm on WSL 2\" | Hashnode"
description: "Discussion on \"Setting up Nodejs with nvm on WSL 2\". In this article, we are going to set up Nodejs using nvm on WSL 2. NVM makes it easier to run and manage multiple node versions."
url: "https://hashnode.com/posts/setting-up-nodejs-with-nvm-on-wsl-2/60a8affa20d1f45ceb7ed755"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Setting up Nodejs with nvm on WSL 2](https://blog.devsharma.live/setting-up-nodejs-with-nvm-on-wsl-2?utm_source=hashnode&utm_medium=feed)

In this article, we are going to set up Nodejs using nvm on WSL 2. NVM makes it easier to run and manage multiple node versions.

May 22, 2021 · 2 min read · blog.devsharma.live  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[Dev Sharma](https://hashnode.com/@cryptus-neoxys)

@cryptus-neoxys · India

  
[View profile](https://hashnode.com/@cryptus-neoxys)

JAMStack Developer | Student

I'm a web developer and a college sophomore, currently focused on JAMStack and building scalable applications.

## Responses 1

Markdown supported · ⌘↵ to post

[Darren Evans](https://hashnode.com/@seefer)

[Oct 4, 2021](https://hashnode.com/posts/setting-up-nodejs-with-nvm-on-wsl-2/60a8affa20d1f45ceb7ed755/comment/615b54bdad6beb6f6506f6f6)

I find **nvm** in a WSL Linux distro confusing. Firstly, I have nvm for Windows installed. Entering my Ubuntu 20.04 distro and following the install instructions for the Linux version of nvm and then typing whereis nvm, I see the path is a Windows mount at: /mnt/c/Users/seefe/AppData/Roaming/nvm/nvm.exe.

When I printenv in Linux I see `NVM_DIR=/home/seefer/.nvm` is pointing at the Linux filesystem version. Very confusing. I also installed **gatsby-cli** in Windows and Linux and again, it points to the Windows version and typing `gatsby` in Linux takes 20 seconds to respond due to slow WSL interop across Windows<->Linux filesystems :/

[Dev Sharma](https://hashnode.com/@cryptus-neoxys)

[Nov 15, 2021](https://hashnode.com/posts/setting-up-nodejs-with-nvm-on-wsl-2/60a8affa20d1f45ceb7ed755/comment/615b54bdad6beb6f6506f6f6#reply-619269d2fd3a1a5a01a88acf)

Yes, there are some issues that need to be worked through, but overall I feel working with WSL2 is relatively a much better experience, tho it can really be a PITA sometimes.
