# Windows

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.&#x20;

{% hint style="info" %}
If you already have WSL  installed, make sure you have the **Ubuntu 24.04** version installed. Otherwise, the framework might not work as intended.
{% endhint %}

***

## Step 1: Install PyCharm

Download and install [PyCharm](https://www.jetbrains.com/pycharm/download/) for Windows. We strongly recommend installing the Professional version of PyCharm (free of cost). To do this, you will need to create an account using your university student email address. You may also use the Community edition, however we do not oficially support it.

***

## Step 2: Install WSL <a href="#step-2-install-wsl" id="step-2-install-wsl"></a>

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).

{% hint style="warning" %}
Any terminal commands that are mentioned in the following guides should be executed in a **WSL terminal** - not your Windows command line.
{% endhint %}

***

## Step 3: Install Miniconda3

```bash
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh
```

After installing, close and reopen your terminal application or refresh it by running the following command:

```bash
source ~/miniconda3/bin/activate
```

***

## Step 4: Set up SSH with GitHub <a href="#step-4-set-up-ssh-with-github" id="step-4-set-up-ssh-with-github"></a>

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 [GitHub SSH Setup Guide](https://computerscienceeducation.gitbook.io/computer-networks-lab-manual/github-ssh-setup) for this. **Make sure to execute all commands from within your WSL terminal!**

***

## Step 5: Set up PyCharm with WSL

1. Follow the [Framework Setup](https://computerscienceeducation.gitbook.io/computer-networks-lab-manual/framework-setup) section to create your conda environment.
2. Click the [Python Interpreter selector](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) and choose Add New Interpreter.
3. Select **On WSL**.
4. Wait until PyCharm detects Linux on your machine and completes introspection. Click Next to proceed:\\

   <figure><img src="https://1494777194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJ5zOZ6zzpxr0eW04pKd%2Fuploads%2FdHyo7SvVwPtht6D57d62%2Fimage.png?alt=media&#x26;token=7980b265-fb36-48ef-9067-199bb7e496ad" alt=""><figcaption></figcaption></figure>
