Running WSL Programs in Windows

Following my previous article on WSL,

Ikechi Michael
1 min readMay 3, 2019

I have just installed dotnet in WSL, and need it to be used on Windows via Command Prompt and PowerShell, without installing a fresh copy. Here’s a guide …

  1. Create a folder such as C:\tools, to keep your shell scripts.
  2. Add that folder to your PATH environment variable

3. Create a dotnet.bat script in C:\tools with this content:

@echo off
bash -c 'dotnet %*'

4. Now, open Command Prompt, and enter dotnet

5. Enjoy!

--

--

Ikechi Michael
Ikechi Michael

Written by Ikechi Michael

I’ve learned I don’t know anything. I've also learned that people will pay for what I know. Maybe that's why they never pay.

No responses yet