RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /Local AI on Windows
  6. /Ch. 2
Local AI on Windows

02. WSL2 Installation and Configuration

Chapter 2 of 15 · 20 min
KEY INSIGHT

WSL2 runs a real Linux kernel as a VM—it is not a compatibility layer. This means kernel version matters, and updating WSL2 requires a Windows driver update, not an `apt upgrade`.

WSL2 requires Windows 10 version 2004 or later, or Windows 11. Run winver in Run to check your build number. Windows 11 22H2 or later is strongly recommended because it includes WSL2 GPU scheduler improvements that reduce latency for inference workloads.

Installation in an elevated PowerShell prompt:

wsl --install

This installs the WSL2 kernel, Ubuntu as the default distribution, and the Docker Desktop integration layer. After reboot, Ubuntu launches and prompts you to create a Linux username and password. These are separate from your Windows credentials—WSL2 has its own user database.

Verify the installation:

wsl.exe -l -v
# NAME                   STATE           VERSION
# Ubuntu                 Running         2
# docker-desktop         Stopped         2
# docker-desktop-data    Stopped         2

The VERSION column must show 2 for WSL2. Version 1 is an older architecture without GPU passthrough. If you see 1, convert the distribution:

wsl.exe --set-version Ubuntu 2

Common failure: wsl --install hangs on "Installing: WSL2 kernel update package" if Windows Update is blocked or if the machine is on a metered connection. Workaround: download the WSL2 kernel update MSI manually from Microsoft's catalog and install it with msiexec /i wsl_update_x64.msi.

Once installed, update the system and install core utilities:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git build-essential htop net-tools

Set a default working directory so new WSL2 terminals open somewhere sensible:

echo "cd /mnt/c/Users/YOUR_USERNAME" >> ~/.bashrc

Replace YOUR_USERNAME with your actual Windows username. The /mnt/c path maps to C:\ inside WSL2.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

Create a file inside WSL2 at ~/test.txt, verify it exists from Windows at \\wsl$\Ubuntu\home\youruser\test.txt, then delete it from both sides. This confirms the cross-filesystem link is working.

← Chapter 1
Introduction to Local AI on Windows
Chapter 3 →
WSL2 Memory and Performance Tuning