LogoLogo
  • Introduction
  • Getting Started
    • Setup
      • Windows WSL Instructions (new)
      • Windows WSL Instructions
      • Linux Instructions
    • Creating your experiment
    • Running your experiment
    • Updating your experiment
  • Conceptual Overview
    • Game Life Cycle
      • Customising when players submit stages
    • Concepts
    • Randomization & Batches
    • API
  • Guides
    • V2 Migration
    • Managing the Data
    • Special Empirica Components
    • The Admin Panel
    • Deploying Your Experiment
      • Ubuntu tutorial
  • Tutorials
    • Beginner Experiment: Prisoner's Dilemma
      • Part 1: Before you start
      • Part 2: Creating the Experiment in Empirica
      • Part 3: Getting Accustomed to the Code
      • Part 4: Coding the Prisoner's Dilemma Game
        • Part 4.1: Removing example code
        • Part 4.2: Intro Text
        • Part 4.3: Set up the game stages
        • Part 4.4: Build the "Choice" React Component
        • Part 4.5: Build the "Result" React Component
        • Part 4.6: Compute the Score
      • Part 5: Customizing the experiment
        • Part 5.1: Changing the number of rounds
        • Part 5.2: Turning the chat on and off
      • Part 6: Deployment
  • FAQ
    • I need help!
    • The Processes and Elements of an Empirica Experiment
    • Managing Players and Games
  • Resources
    • Helpful Linux Commands
    • Code Editors
    • Javascript and React
  • Links
    • Empirica website
    • Twitter
    • GitHub
Powered by GitBook
On this page
  • Step 1. Install WSL 2 and Ubuntu 20.04
  • Step 2. Install NVM
  • Step 3. Editing Files in WSL2
  • Using code editors

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started
  2. Setup

Windows WSL Instructions

PreviousWindows WSL Instructions (new)NextLinux Instructions

Last updated 1 year ago

Was this helpful?

Step 1. Install WSL 2 and Ubuntu 20.04

  1. Follow either the written instructions or video tutorial below to install WSL2.

  2. During this process, select "Ubuntu 20.04" or higher as your Linux version.

  3. See our overview below for a summary with screenshots.

Written Instructions:

Video Tutorial: (commands in the description)

Our Summary of these Instructions:

  1. Enable the Windows Subsystem for Linux

  2. Ensure you meet the requirements for WSL2

  3. Enable the Virtual Machine feature in Windows (see screenshot below)

  4. Download the WSL2 update package

  5. Set WSL2 as your default Linux system

  6. Open Microsoft store, search for Ubuntu 20.04, and install it

  7. Launch the terminal and follow the prompt to create a new username/password (see screenshot below).

Screenshot: Enabling Virtual Machine feature in Windows:

Screenshot: Running Ubuntu 20.04 in Windows for the first time:

Step 2. Install NVM

Note: Copy these commands and then paste into WSL2 by right-clicking on the terminal.

Enter the following commands into your Ubuntu terminal:

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash  # Download and install
source ~/.profile  # Reload system environment
nvm install lts/erbium

Step 3. Editing Files in WSL2

In order to access your WSL2 file directory, run the following command in WSL2:

explorer.exe .

This will allow you to browse WSL2 as if it were another computer on a local network.

If you are using the WSL, you files for your experiment must be in the WSL, you can't use the WSL to run an experiment stored on the rest of your computer.

Using code editors

Different (such as VSCode) will have commands that you can run to open them in the current directory (e.g., code .). This helps make for a better coding experience in the WSL.

code editors
https://docs.microsoft.com/en-us/windows/wsl/install-win10
https://www.youtube.com/watch?v=D7Em1wjMiak