Skip to content

Instantly share code, notes, and snippets.

@ryanttb
Last active December 4, 2019 14:28
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanttb/9c66880b367930e402c2323c024cd202 to your computer and use it in GitHub Desktop.
Save ryanttb/9c66880b367930e402c2323c024cd202 to your computer and use it in GitHub Desktop.
Install node on Linux Subsystem for Windows
#!/bin/sh
# this script requires root
# be sure to run the following before running this:
# $ sudo su
# since there's an issue piping the curl response to bash
# just download the install script
curl -sL https://deb.nodesource.com/setup_6.x > install_node.sh
# make it executable and run it
chmod a+x install_node.sh
./install_node.sh
# run apt-get for nodejs
apt-get install nodejs
# get the latest version (well, 6.x since we downloaded setup_6.x)
npm install npm@latest -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment