mykeels.com

Running WSL Programs in Windows

Following my previous article on WSL,

Running WSL Programs in Windows

Following my previous article on WSL,

https://medium.com/@mykeels/on-figuring-out-wsl-105e2de56192

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

  1. Create a dotnet.bat script in C:\tools with this content:
@echo off
bash -c 'dotnet %*'

  1. Now, open Command Prompt, and enter dotnet

  1. Enjoy!

Tags