Skip to content

Instantly share code, notes, and snippets.

Last active August 15, 2020 19:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rocktimsaikia/70a309cf123e061db1782db32ea4a26a to your computer and use it in GitHub Desktop.
Steps to install windows subsystem for linux ⚡

Installing nodejs in Windows Subsystem for Linux (WSL) ⚡

Assuming that you already have WSL installed in your windows.


  1. update Ubutu to it's latest version. Don't if you already have.

sudo is equivalent to running as administrator

sudo apt-get update
sudo apt-get upgrade
  1. install nvm which is node version manager.

This will install v0.35.0, check the nvm repo if there are newer versions.

curl -o- | bash
  1. Restart your terminal after install.

  2. Now install the latest the latest LTS version of node:

npm & npx includeded

nvm install --lts


To update node just run the command again.

One thing you'll have to remember when use NVM is that you'll need to explicitly specify the node version you want to use (installing does it automatically on the end of the install), so next time you'll login to ubuntu you'll need to run the command:

nvm use --lts

You can also add this command to the end of your .bash_profile file:

echo "nvm use --lts" >> .bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment