gpt4 book ai didi

bash - 如何在当前 PowerShell 工作目录中从 PowerShell 进入 Windows-Subsystem-for-Linux (ubuntu)

转载 作者:行者123 更新时间:2023-12-04 19:00:23 26 4
gpt4 key购买 nike

运行命令时bashubuntu在 PowerShell 中,输入了 Windows-Subsystem-for-Linux,但是,PowerShell 的当前工作目录不会传递到 BASH。有没有办法实现这个功能?

最佳答案

在您的 Windows Powershell 或 Powershell Core 窗口中,输入 bash (或wsl);例如:

enter image description here

现在,更高版本的 Windows 包括 WSL.exe,它取代了 bash.exe。这两个可执行文件的行为在我的系统上是相同的。 wsl.exe 的官方文档指出:

enter image description here

您可以阅读该文档 here .网网,

我正在运行 Windows 10 Build-17763。如果您没有遇到与我相同的行为,您可能正在运行旧版本的 WSL。您可以根据内部版本号确定 WSL 的版本。

关于bash - 如何在当前 PowerShell 工作目录中从 PowerShell 进入 Windows-Subsystem-for-Linux (ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53832761/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com