Skip to content

Set up freeCodeCamp on Windows Subsystem for Linux (WSL)

This guide covers some common steps with the setup of WSL2.

Once some of the common issues with WSL2 are addressed, you should be able to follow this local setup guide to work with freeCodeCamp on Windows running a WSL distro like Ubuntu.

System Requirements

  • Hardware:
    • A fast CPU (6+ cores)
    • At least 12+ GB RAM
    • 20+ GB of free disk space
    • (Optional) 30-50 Mbps internet connection
  • Operating System: A version of Windows that meets the WSL system requirements.
  • WSL: Your Linux distribution must run in WSL 2 mode.

Follow the instructions on the official documentation to install WSL2.

  1. We recommend using an Ubuntu LTS release supported by Playwright with WSL2.

    Playwright, the end-to-end testing library used by freeCodeCamp, supports specific Ubuntu and Debian releases. Check its system requirements before choosing a release.

    You may use other non-Debian-based distributions, they all come with their own ‘gotchas’ that are beyond the scope of this guide.

    Here is how you can run a linux flavour of your choice

  2. Update the dependencies for the OS

    Terminal window
    sudo apt update
    sudo apt upgrade -y
    # cleanup
    sudo apt autoremove -y

Check that Git is installed in your Ubuntu distribution:

Terminal window
git --version

If Git is not installed, run sudo apt install git.

(Optional but recommended) You can now proceed to setting up your ssh keys with GitHub.

We recommend installing Visual Studio Code on Windows with its WSL extension. Follow the official VS Code WSL guide to connect to your Ubuntu distribution.

You will edit and store your code in your Ubuntu distribution, with VS Code installed on Windows.

We recommend you install the LTS release for Node.js with node version manager - nvm. Once installed use this command to install and use the latest Node.js LTS version:

Terminal window
nvm install --lts

For instructions on installing and using a different version of Node.js, please refer to the nvm docs.

Node.js comes bundled with npm, which you can use to install pnpm:

Terminal window
npm install -g pnpm

The default settings for your WSL installation can vary. Allocate memory and swap space according to your workload and the resources available on your machine.

Follow the official WSL configuration guide to configure these limits and apply your changes.

Now that you have installed the pre-requisites, follow our local setup guide to clone, install and set up freeCodeCamp locally on your machine.

Here are some useful links: