I recently (recently being about 3 AM this morning) decided that I’d try and replace my /VMWare setup with something a lot less resource intensive, Windows new Subsystem for (WSL). For those of you that aren’t familiar, WSL is not a VM. Rather it is a special Ubuntu distro built into Windows 10 that can be activated by using . Microsoft has been making big strides recently to become a more open-source company, and WSL has gone a long way towards bringing devs back to Windows. Arch Linux Linux bash.exe Now it’s definitely not a perfect solution. For now there is no built-in way to interface with Windows window manager, which means to get GUI applications running you have to install an X server and hack around. Certainly not ideal. Even with this hacky solution, a lot of editors just don’t work right. doesn’t even launch. Atom Arch Linux running in WSL using the Hyper terminal emulator So the solution would appear obvious; just install the Windows binary of Atom and use it that way. That would be a fine solution if Atom (or VScode, Sublime, or any other editor) had baked in support for WSL, but they don’t. When you install a linter, like for example, it expects there to be a binary available in the path and has no clue that WSL even exists. That means that I can do all the hacking around I want with PHP in the terminal, but if I want to lint code in Atom I have to install the PHP binary in Windows using something like . Obviously having 2 of the same, or slightly different, binary is not ideal. linter-php Windows Chocolatey So now that you see the problem, let’s talk about the solution. (These tests were being done with , but the steps would be similar for any plugin in Atom that requires access to a binary) linter-php WSL recently had an update that included a “interop” for bash. This allows you to enter a command like into command prompt, have it execute the command , and return the result without you ever having to enter the shell itself. This seemed like it would be the perfect solution. So I opened up Atom's settings, went to the settings for , and changed the "PHP Executable Path" to . Now either because of the necessary quotes around interfering with the passing of arguments, or just because the "PHP Executable Path" doesn't accept arguments, this didn't work. bash.exe -c "php -v" php -v linter-php bash.exe -c "php" PHP So I thought to myself, ‘how can I proxy a request to WSL’s PHP as a single command?’ A Windows batch file! So I set about writing a simple batch file and this is the result I got @echo offbash.exe -c "php %*" Just 2 lines of code! The first line turns off so that the command isn't echoed back. The second line simply executes passing in the argument for the interop and running with any included arguments. echo bash.exe -c php To test if it works I changed my “PHP Executable Path” in the settings to , opened up a PHP file, screwed something up, and bam! The red squiggly of death was there to greet me instead of an annoying error popup. I have never been so happy to see a linter error. linter-php C:\\Users\\myusername\\path\\to\\php.bat As a result of this journey I’ve decided to create a Git repo to host batch files such as this. It’s located at . https://github.com/watzon/wsl-proxy The original article was published on my blog at . Please go check it out and subscribe! https://blog.cwatsondev.com