Skip to content

Instantly share code, notes, and snippets.

@michaeltreat
Last active April 26, 2018 20:27
Show Gist options
  • Save michaeltreat/2219f2e4126b7c4417017a4504220dc7 to your computer and use it in GitHub Desktop.
Save michaeltreat/2219f2e4126b7c4417017a4504220dc7 to your computer and use it in GitHub Desktop.
Node install instructions for WSL

Install Node on the Windows Subsystem for Linux.

Home

Install Node

  1. Open a new shell and type wsl.
  2. Type cd ~/../../.
  3. Type sudo apt-get update
  4. Copy these two lines and paste them into the terminal:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

The first line will handle getting everything ready. The second line will show up once the first line has finished. Press enter when the second line shows up in your terminal.

Verify installation

  1. Close the window and open a new shell, and type wsl as usual.
  2. Type node -e 'console.log("works")'
  3. If you get a response back that says works then you're all good to go!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment