运行命令时bash
或 ubuntu
在 PowerShell 中,输入了 Windows-Subsystem-for-Linux,但是,PowerShell 的当前工作目录不会传递到 BASH。有没有办法实现这个功能?
最佳答案
在您的 Windows Powershell 或 Powershell Core 窗口中,输入 bash
(或wsl);例如:
现在,更高版本的 Windows 包括 WSL.exe,它取代了 bash.exe。这两个可执行文件的行为在我的系统上是相同的。 wsl.exe 的官方文档指出:
您可以阅读该文档 here .网网,
我正在运行 Windows 10 Build-17763。如果您没有遇到与我相同的行为,您可能正在运行旧版本的 WSL。您可以根据内部版本号确定 WSL 的版本。
关于bash - 如何在当前 PowerShell 工作目录中从 PowerShell 进入 Windows-Subsystem-for-Linux (ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53832761/