我想打开这个\\wsl.localhost\Ubuntu
git bash 终端中的 wsl 目录。我的 git bash 终端当前在 /c/Users/DELL
中打开目录。
我试过\\wsl.localhost\Ubuntu
将此命令粘贴到 bash shell 中,但它会抛出错误,指出 bash: \wsl.localhostUbuntu: No such file or directory
.
任何人都可以帮我在 git bash 终端中打开它吗?
但现在我无法这样做,不知道我之前是如何做到的
最佳答案
运行此命令:
cd //wsl.localhost/Ubuntu
命令 \\wsl.localhost\Ubuntu
不起作用,因为
Bash 在解析命令时删除反斜杠(解决方案:使用正斜杠:
/
)。您没有表明要更改当前目录,否则 Bash 会将您的命令解释为按该名称运行外部程序(解决方案:使用 cd 命令)。
关于linux - 如何在 git bash 终端中打开 wsl 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75357281/