Calling Windows subsystem for Linux apps through PowerShell/cmd [closed]

给你一囗甜甜゛ 提交于 2019-12-07 20:30:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!