# Windows (WSL) Setup

Juergen runs inside [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/) (Windows Subsystem for Linux). You get a full Ubuntu environment — all Linux tooling works natively.

> Already have WSL 2 with Node.js ≥ 18, npm, and git? Skip straight to [Install](../README.md#install).

## 1. Install WSL 2 + Ubuntu

Open **PowerShell as Administrator** (right-click the Start button → _Terminal (Admin)_) and run:

```powershell
wsl --install
```

This installs WSL 2 with Ubuntu as the default distribution. **Restart your PC** when prompted. On first boot, Ubuntu will ask you to create a username and password.

> Already have WSL 1? Upgrade: `wsl --set-default-version 2`

## 2. Open the WSL terminal

[Windows Terminal](https://aka.ms/terminal) ships with Windows 11 and supports truecolor out of the box. Open it and select the **Ubuntu** tab (or type `wsl` in any tab).

> On Windows 10, install Windows Terminal from the [Microsoft Store](https://apps.microsoft.com/detail/9n0dx20hk701). The legacy `cmd.exe` and PowerShell consoles lack truecolor and will show visual glitches.

Everything below runs **inside the WSL shell**.

## 3. Update packages & install build tools

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential curl
```

## 4. Install Node.js & npm

The recommended way is [nvm](https://github.com/nvm-sh/nvm) — it lets you manage Node versions without `sudo`:

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
```

Close and reopen your terminal (or run `source ~/.bashrc`), then:

```bash
nvm install --lts
```

Verify both:

```bash
node --version   # should be ≥ 18
npm --version
```

## 5. Install git (if missing)

Ubuntu includes git by default. Check:

```bash
git --version
```

If it's not found:

```bash
sudo apt install -y git
```

## 6. WSL-specific notes

- **File system** — Work inside the Linux filesystem (`~/…`), not `/mnt/c/…`. Cross-filesystem access is slow and can cause permission issues.
- **VS Code** — Install the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) — it connects seamlessly to your WSL environment.
- **Docker** — [Docker Desktop for Windows](https://docs.docker.com/desktop/wsl/) with the WSL 2 backend is supported if you need containerized workloads.
- **Clipboard** — Copy/paste in Windows Terminal works with **Ctrl+Shift+C** / **Ctrl+Shift+V**.

---

✅ Done — head back to [Install](../README.md#install).
