CO Lab Manual
Course Page
  • Course Information
    • Welcome
    • Introduction
    • Your Contributions
    • Lab Sessions and Etiquette
    • Team Setup
    • Assumed Prior Knowledge
  • Setup Guides
    • GitHub Repository Setup
    • Technical Setup
      • Windows
      • Linux
      • macOS
    • GitHub SSH Setup
    • Framework Setup
  • Reference Documentation
    • Introduction to the Documentation
    • A Brief History Lesson
    • Syntax (Intel vs. AT&T)
      • Section Exercises
    • Memory
      • Memory Management
      • Section Exercises
    • Registers
      • Section Exercises
    • Instructions
    • Subroutines
      • Calling Subroutines
      • Writing Subroutines
      • Section Exercises
    • Input/Output
      • Printing to the Terminal
      • Reading from the Terminal
      • Section Exercises
    • Programming Constructs
    • Assembler Directives
    • C/C++ vs Assembly
    • Building and Running Programs
    • Address Sanitization
    • A0: A Running Example
  • Assignments
    • Introduction to the Assignments
    • Mandatory Assignments
      • A1: Subroutines and I/O
      • A2: Recursion
    • Extra Assignments
      • A3-a: Fibonacci Calculator
      • A3-b: Fibonacci REPL
      • A4: Diff
      • A5: Printf
      • A6: HPC
      • A7: Bitmap
      • A8: Game
  • Appendix
    • Acknowledgments
    • Rules and Regulations
    • Frequently Asked Questions
    • How to use a Debugger
Powered by GitBook
On this page
  • Step 1: Install VS Code
  • Step 2: Install WSL
  • Step 3: Install the Required Packages
  • Step 4: Set up SSH with GitHub
  • Step 5: Open VS Code from WSL
  1. Setup Guides
  2. Technical Setup

Windows

PreviousTechnical SetupNextLinux

Last updated 4 months ago

To work on the assignments, you need a UNIX-like environment. Luckily, even though Windows is not UNIX-based, the Windows Subsystem for Linux (WSL) allows you to run a Linux distribution in a virtual machine (VM) with minimal setup. You may already know this setup from the Computer Programming course.

If you already have WSL installed, you do not need to install it again. However, make sure to follow all other steps of this guide. Otherwise, the framework might not work as intended.


Step 1: Install VS Code

Download and install (VS Code) for Windows and install the WSL Extension.


Step 2: Install WSL

  1. Open PowerShell as administrator.

  2. Enter wsl --install (This step may take a few minutes)

  3. When prompted choose a username and password for the WSL user account.

WSL should now be installed and the PowerShell window will show the command line for the Linux VM. From now on, you can enter this Linux VM by opening the WSL App from within Windows (e.g., by typing "WSL" in the search bar).

Any terminal commands that are mentioned in the following guides should be executed in a WSL terminal - not your Windows command line.


Step 3: Install the Required Packages

The WSL setup is not yet fully done. To install the tools needed for building your assignment programs, run the following command in your WSL terminal:

sudo apt update && sudo apt install -y cmake clang make llvm libclang-dev

Step 4: Set up SSH with GitHub


Step 5: Open VS Code from WSL

After you have set up SSH with GitHub and cloned your repository:

  1. Navigate to the newly created folder (cd <repo_name>)

  2. Enter code .

  3. A message should appear that the VS Code Server is getting installed/updated and after the process finishes, a VS Code window should open to the root folder of the framework.

If the blue box does not show "WSL" something went wrong in the previous steps.

One of the easiest ways to access your GitHub account (and with that your private repository) from within WSL is to set up a Secure Shell (SSH) key. Follow the for this. Make sure to execute all commands from within your WSL terminal!

You can validate that VS Code is running through WSL by checking whether the bottom left corner of the window shows a small blue box with the "WSL: Ubuntu" text in it:

Visual Studio Code
GitHub SSH Setup Guide