Environment Setup

[course home > assignments]

Setting up WSL

WSL stands for Windows Subsystem for Linux—this essentially creates a Linux virtual machine that’s deeply integrated into your Microsoft Windows system. If you’re on Microsoft Windows, please use WSL. We’ve had students who used MinGW and other runtimes—they had a much harder time developing their projects.

These steps were verified to work on Microsoft Windows 11 x64 23H2. They may work on previous versions of Microsoft Windows (down to Windows 10), but it’s not guaranteed. Please seek help in office hours if you get stuck.

Here are the steps to get WSL set up:

  1. Go to the Microsoft Store and search for Ubuntu (feel free to install any distro, but we’ve just tested with Ubuntu). Install it.
  2. Go to Control Panel (Win + R, type control, hit enter) > Programs and Features > Turn Windows features on or off. Select Windows Subsystem for Linux.
  3. Reboot your computer.
  4. Go to your command prompt and enter the following commands:
      wsl.exe --update
      wsl.exe --install Ubuntu-22.04
  5. Reboot your computer.
  6. Go to your command prompt and enter ubuntu. Follow the prompts to set up your UNIX username and password.
  7. Once you’re in your Ubuntu install, run the following commands:
      sudo apt update
      sudo apt install -y git

You’ve now got a working WSL install!

Installing Docker

We’ll be using Docker, which is a form of containerization software that creates isolated environments according to certain specifications, to replicate our autograding environment. Feel free to read more about it here. All you really need to know is that it’s very similar to a virtual machine.

Let’s install Docker on your system. Head over to https://www.docker.com and click on the install button for your machine. Follow the installation instructions. (On Microsoft Windows, make sure the WSL 2 option is selected. If you forgot to do this/you already have Docker Desktop installed, visit this page for more information.)

Installing Visual Studio Code

Visual Studio Code (VSC) also has great WSL support for Microsoft Windows users.

Head over to https://code.visualstudio.com to download and install the appropriate version of VSC. Follow the instructions and any prompts.

Launch VSC. Follow these instructions if you’re on WSL:

  1. On first launch, VSC will recommend installing the WSL extension. (If the prompt doesn’t show up, install it in the Extensions tab.) Follow the prompts to install it and restart VSC.
  2. In the bottom, left-hand corner of your window, there should be a colored remote connect button. Select it and click on Connect to WSL.
  3. This will open up a new window that’s connected to your WSL installation! You’ll have to repeat step 2 any time you open up a new VSC workspace.