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. 10
Local AI on Windows

10. Path Configuration

Chapter 10 of 15 · 20 min
KEY INSIGHT

The Windows PATH and the WSL2 Linux PATH are completely separate namespaces. Executables installed in one are invisible to the other unless you use cross-shell invocation commands like `wsl` or `/mnt/c/`.

PATH conflicts between Windows and WSL2 tooling cause persistent confusion. The Windows PATH variable contains directories searched when you run an executable from CMD or PowerShell. The Linux PATH inside WSL2 is separate. ollama run from WSL2 uses the Linux binary. ollama run from PowerShell uses the Windows binary. If both are installed, they are separate runtimes with separate model storage.

Check Windows PATH:

$env:PATH -split ';'

Check WSL2 PATH:

echo $PATH | tr ':' '\n'

The Windows-side Ollama installer adds C:\Users\YOUR_USERNAME\AppData\Local\Programs\Ollama to the Windows PATH. WSL2 binaries are not in the Windows PATH.

To call the WSL2 Ollama from PowerShell, use wsl:

wsl ollama list

To call the Windows Ollama from inside WSL2, use the full Windows path or rely on the Windows binary being inaccessible from Linux. They are separate unless you explicitly run the Windows executable through Wine or a similar compatibility layer.

For tools that need to run from both sides (Ollama being the most common), either run the WSL2 version exclusively and call it via wsl from PowerShell, or run the Windows version exclusively and call it from WSL2 via the Windows executable path. Mixing them leads to model storage fragmentation.

Add custom directories to the WSL2 PATH:

echo 'export PATH=$PATH:/opt/custom/bin' >> ~/.bashrc
source ~/.bashrc

Add custom directories to the Windows PATH via PowerShell:

$env:PATH += ";C:\custom\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH + ";C:\custom\bin", "User")

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

Run which ollama inside WSL2 and note the path. Run where.exe ollama in PowerShell and note the path. Confirm they point to different files. Run wsl which ollama in PowerShell to verify cross-shell invocation works.

← Chapter 9
LM Studio GUI Alternative
Chapter 11 →
Antivirus Considerations