A simple helper script to get the basics setup on your Windows subsystem.

You’ll need to do a couple manual things first:

  1. Setup Linux (Ubuntu) subsystem
  2. Install Visual Studio Code or some editor (helpful but not required)
  3. Save this script to your linux subsystem
  4. Execute the script in your bash terminal

sudo bash /path/to/litwicki-winix-setup.sh

The Script

#!/usr/bin/env bash

##########################################################################################################
# This file is somewhere here
#   C:\Users\{YOUR_USERNAME}\AppData\Local\Packages\{YOUR_DISTRO}\LocalState\rootfs
##########################################################################################################

# Get nodejs to install (later)
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -

# Get yarn pubkey and add to apt
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

# Add yarn to apt list
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

# Install all the developer the goodness
sudo apt-get update && sudo apt-get install yarn nodejs gcc g++ make

# Install node goodness
# Credit to: https://hackernoon.com/the-best-of-npm-install-g-9ab9d749eeb1
curl -sL https://gist.githubusercontent.com/transitive-bullshit/73978cde6a0768aef6ca0419d2d08858/raw/32faeba099756184ff0e924dc74629d7143238a0/npm.sh npm-packages.sh | sudo -E bash -

# Install more goodness
npm install -g serverless