A practical WSL2 setup for low-level systems and GPU work.
Essentials
- Use WSL2 (not WSL1) for real Linux syscalls and GPU passthrough.
- Keep your project files inside the Linux filesystem (
~/), not on/mnt/c— cross-filesystem I/O is painfully slow. - Configure
.wslconfigto cap memory and enablelocalhostForwarding.
GPU / CUDA
- Install the Windows NVIDIA driver only; the CUDA toolkit goes inside WSL.
- Verify with
nvidia-smifrom the WSL shell.
Dev loop
ccache+ a warm build dir makes iterating on PyTorch source builds bearable.
Related: cuda-debugging, performance-reading-list.