Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve integration of Linux tools with Windows command line #1823

Open
rustyx opened this issue Mar 27, 2017 · 4 comments
Open

Improve integration of Linux tools with Windows command line #1823

rustyx opened this issue Mar 27, 2017 · 4 comments
Labels

Comments

@rustyx
Copy link

rustyx commented Mar 27, 2017

It seems to be impossible to execute Linux tools from cmd or anywhere else outside bash.exe.

For example, I can't run grep from cmd:

C:\>C:\Users\test\AppData\Local\lxss\rootfs\bin\grep
'C:\Users\test\AppData\Local\lxss\rootfs\bin\grep' is not recognized as an internal or 
external command, operable program or batch file.

C:\>C:\Users\test\AppData\Local\lxss\rootfs\bin\grep.
'C:\Users\test\AppData\Local\lxss\rootfs\bin\grep.' is not recognized as an internal or 
external command, operable program or batch file.

If I give grep the .exe extension, it still doesn't work:

C:\>bash -c "sudo cp /bin/grep /bin/grep.exe"

C:\>C:\Users\test\AppData\Local\lxss\rootfs\bin\grep
This version of C:\Users\test\AppData\Local\lxss\rootfs\bin\grep.exe is not compatible with
the version of Windows you're running. Check your computer's system information and then
contact the software publisher.

It would have been great to be able to use Linux tools directly from Windows scripts. Otherwise I am kind of forced to keep cyg *cough* win installed.

Maybe automatically give executable ELF files an .exe extension and/or have the Windows subsystem recognize them and forward to Lxss?

@jackchammons
Copy link
Contributor

Pretty interesting idea. We'll keep this in mind for our future planning.

@therealkenc
Copy link
Collaborator

At one point there was this User Voice entry, but it was locked.

@sunilmut
Copy link
Member

I agree that there are merit in this post and the User Voice ticket (thanks @therealkenc) for it to be considered. @bitcrazed to see if we can reopen it, so that people can continue to vote and discuss. We can always add comment to User Voice ticket stating that this is not being considered at the moment. But, there is little value in closing a ticket, when it is not complete.

@mhamrah
Copy link

mhamrah commented Aug 1, 2018

Just want to +1 this. Would love to be able to run executables located within WSL from windows without having to specify 'wsl' as the command. For instance, if I have something like flow, or go in my PATH in WSL, that is executed in WSL, I'd love to call flow or go directly from the Windows side. This will make running windows apps, like VS code, whose extensions require a specific set of commands available on the PATH, easier. Currently I see engineers setting up some x-terminal so VS Code runs under linux and presented via the x-windows system. By making executables located within WSL available natively on the windows side--without having to run them through the wsl command--will make the wsl a very seamless experience from Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants