Vik*_*Vik 3 windows bash shell ubuntu windows-subsystem-for-linux
什么是保持Windows 10 Path和'Bash on Ubuntu on Windows(WSL)'路径同步的最佳方法?
我已将Windows 10 Path(将其转换为bash兼容)附加到.bashrc,但bash shell似乎没有将其拾取.
我采取的步骤:
从Insider build 145963(ish)开始,您不需要在.bashrc中附加Windows路径:
在后续版本中,从Creators Update开始,WSL会自动将Windows路径附加到Bash路径,允许您从Bash中启动Windows可执行文件,而无需将绝对文件夹位置输入到路径上的可执行文件.
例如,导航到C:驱动器上的临时文件夹,创建文本文件并在记事本中打开它:
$ cd /mnt/c/temp
$ echo Hello > hello.txt
$ Notepad.exe ./hello.txt
Run Code Online (Sandbox Code Playgroud)
提示:不要忘记
.exe扩展 - 这就是告诉Linux要求WSL启动.exe的原因
| 归档时间: |
|
| 查看次数: |
1616 次 |
| 最近记录: |