All Articles

Netlify on WSL

  1. Enable WSL if you haven’t already
  2. Install Ubuntu (or preferred flavor of Linux) via the Microsoft Store.
  3. Install Node & Yarn
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install -y nodejs yarn
  1. Set your npm prefix to ~/.local (in ~/.npmrc) to enable sudo-less global install
prefix = ${HOME}/.local
  1. Install Netlify CLI
npm -g install netlify-cli
netlify --telemetry-disable
netlify login
  1. (Optionally) Install Gatsby CLI & grab a starter
npm -g install gatsby-cli
gatsby telemetry --disable
gatsby feedback --disable