问题
With recently pushed for Windows insiders build 14316 we have Windows subsystem for Linux (beta) that allows to run Ubuntu Linux CLI software on Windows.
It can be launched by running bash
command inside Windows PowerShell or by "Bash on Ubuntu on Windows" app.
So, my question is about first way. We can launch bash
from PowerShell, but none other ubuntu CLI application is available from it. How do you make one work? Let's say that I want zsh
to be available to launch without using bash.
回答1:
Not yet, according to Windows Blog: Run Bash on Ubuntu on Windows:
Third, note that Bash and Linux tools cannot interact with Windows applications and tools, and vice-versa. So you won’t be able to run Notepad from Bash, or run Ruby in Bash from PowerShell.
More in Microsoft/CommandLine-Documentation#32, which is about the related ability to run win32 commands from within Bash:
Rest assured, we're going to be looking into the interop story in the future, but we won't be adding this capability in the Windows 10 Anniversary Update timeframe.
You might have some luck with the -c
option of bash
to run specific commands.
来源:https://stackoverflow.com/questions/36504784/calling-windows-subsystem-for-linux-apps-through-powershell-cmd