小编Mar*_*ark的帖子

Bash on Ubuntu on Windows 10 翻译工作目录

如何在 Windows 10 上的 Ubuntu 上转换 Bash 中的目录,以便我可以通过 Bash 调用 Windows 应用程序并将该工作目录作为选项调用?

例如:

从 Windows 10 上的 Ubuntu 上的 Bash,我可以通过 获取到我的 WindowsC:\驱动器的路径/mnt/c/,这对于从 Bash 命令行打开基于 Windows 的 GUI 应用程序很有用;例如,我可以使用以下命令打开 Sublime Text:

/mnt/c/Program\ Files/Sublime\ Text\ 3/subl.exe
Run Code Online (Sandbox Code Playgroud)

但我不确定如何使用命令行选项来指示 Windows 应用程序使用我当前工作目录中的某些内容。喜欢:

pwd
/home/mark/example
ls
test.txt
mwalle@DESKTOP-LO101K6:~/lyn_solns$ /mnt/c/Program\ Files/Sublime\ Text\ 3/subl.exe test.txt
Unable to translate current working directory. Using C:\WINDOWS\system32
Run Code Online (Sandbox Code Playgroud)

和崇高文本打开显示命名一个新的空白文件test.txtC:\WINDOWS\system32的文件夹。我希望它打开现有test.txt~\example.

directory windows-subsystem-for-linux

5
推荐指数
1
解决办法
3030
查看次数