Quick fix
# Inside WSL: turn both switches on (append the whole section if missing)
echo -e "[interop]\nenabled=true\nappendWindowsPath=true" >> /etc/wsl.conf
# Windows side: restart the distro to apply
wsl --terminate <distro-name>
wsl -d <distro-name>
What you will run into
In WSL, notepad.exe / cmd.exe / explorer.exe all report command not found, and which cmd.exe finds nothing; no Windows-side program can be invoked.
WSL interop (Windows/Linux interop) has been switched off — usually /etc/wsl.conf contains [interop] enabled=false or appendWindowsPath=false (copied from some "clean-up / security hardening" tutorial).
Why this happens
Interop is WSL's Windows/Linux interop mechanism (on by default): it registers Windows executables into Linux via binfmt so you can run .exe directly in WSL, and appends the Windows PATH to the Linux PATH.
Two switches in the [interop] section of /etc/wsl.conf: enabled=false directly disables the ability to run Windows processes (the binfmt registration is removed);
appendWindowsPath=false stops appending the Windows PATH (which cmd.exe finds nothing).
enabled controls "can it execute": at boot WSL registers (or does not register) the binfmt handler based on this switch; when off, any .exe is command not found.
appendWindowsPath controls "can it be found": WSL appends the Windows PATH to the end of the Linux PATH by default; when off, /mnt/c/Windows/system32/ is not in PATH, so even with interop on you must type the full path to run something.
The two switches are independent with different symptoms: enabled=false = running directly reports command not found; appendWindowsPath=false = which finds nothing but the full path /mnt/c/.../cmd.exe still runs.
Deterministic takeaway: first cat /etc/wsl.conf to inspect the [interop] section, then which cmd.exe to branch — check both before touching anything.
Step by step
1. Check the [interop] section — Must do
cat /etc/wsl.conf
2. Branch on the symptom — By diagnosis
enabled=false→ change toenabled=true;appendWindowsPath=false→ change toappendWindowsPath=true;- Both lines present → restore both.
3. Restart the distro — Must do
# Windows side
wsl --terminate <distro-name>
wsl -d <distro-name>
4. Verify — Must do
which cmd.exe # found = PATH is appended again
cmd.exe /c echo interop-ok # runs = binfmt registration restored
How to confirm it works
which cmd.exe resolves to /mnt/c/Windows/system32/cmd.exe; cmd.exe /c echo ok executes normally (garbled Chinese in the console is a UTF-16 display issue and does not affect success).
Other environments
| Switch | Symptom |
|---|---|
enabled=false | Running .exe directly reports command not found (binfmt not registered) |
appendWindowsPath=false | which finds nothing, but full path /mnt/c/Windows/system32/cmd.exe still runs |
| Both off | Both symptoms combined |
Symptom
$ notepad.exe
-bash: notepad.exe: command not found
$ which cmd.exe
(no output)
Signature: Windows programs collectively disappear inside WSL; /etc/wsl.conf has an [interop] section with false values; editing without restarting the distro also looks like "nothing happened".
Cause
Interop is on by default and implemented by registering binfmt at boot (enabled) and appending the Windows PATH (appendWindowsPath). Setting both switches to false in wsl.conf makes Windows processes unexecutable and unfindable in PATH. wsl.conf changes require a distro restart to take effect.
Solution
cat /etc/wsl.confto find the[interop]section;- Set
enabled=true+appendWindowsPath=true(append the whole section if missing); - Restart the distro from Windows with
wsl --terminate <distro-name>; - Verify with
which cmd.exeand a real run.
Verification Evidence
- Mechanism check: Microsoft official docs (learn.microsoft.com/windows/wsl/wsl-config, [interop] section), URL in the evidence log;
- Local comparison (2026-08-31): custom prebuilt WSL has no
[interop]section (all defaults on) —which cmd.exehits,cmd.exe /c echoruns; did not reproduce the fault (to avoid affecting the working environment);
Evidence details kept locally (2026-08-31)
Related canonicals
Read in order: precondition -> same root / same domain / related:
- Related (similar errors, different cause):
- WSL systemd not running (same wsl.conf config pitfall: restart required)
- Garbled output when calling wsl from PowerShell (encoding side of WSL interop)
Applicable tools (1)
This problem is linked from the tool pages below — reachable from either side.
wslSource & evidence
← Coding Agents & Terminal domain | Problem Catalog Experience | Facing another issue? Go to the Helpdesk