The Linux path: same NVCC, different package layer
Two flavors of Linux setup matter:
- Native Linux (Ubuntu 22.04 / 24.04) — what cloud VMs and dedicated AI rigs run. Best performance, full Nsight access.
- WSL 2 on Windows — a true Linux kernel inside Windows that can call your real GPU through NVIDIA's WSL driver. Same Linux toolkit, slightly worse profiling, but lets a Windows dev have a Unix shell + dev tools.
Both use the same Linux CUDA toolkit packages. WSL is special only in that the GPU driver is shared with Windows — you don't install a Linux driver inside WSL, you install the Windows driver outside, and CUDA Linux userland talks to it through a passthrough.
Why nvcc is missing on a fresh WSL install
The Windows-side CUDA installer drops files under Windows paths only. Inside WSL you have a separate filesystem; you must install the Linux-side toolkit packages. They live in NVIDIA's apt repo.