ser*_*rm1 4 environment-variables windows-subsystem-for-linux
其他人使用echo $PATH
命令获得超长路径吗?我正在 Windows 应用商店的 Windows 上使用 BASH shell Ubuntu。
的输出echo $PATH
:
home/mnhir/bin:/home/mnhir/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Users/hersh/AppData/Local/Microsoft/WindowsApps:/snap/bin
Run Code Online (Sandbox Code Playgroud)
mur*_*uru 11
注释几乎不可读,但看起来您的 Windows%PATH%
已附加到 Linux $PATH
. 情况大概就是这样。请参阅WSL 与 Windows 的互操作性:
为了使 Windows 可执行文件更易于运行,Windows 路径包含
$PATH
在秋季创意者更新中的 Linux中。
如果不需要,显然可以使用 Windows 注册表禁用此功能。
Ben*_*ith 10
在 WSL 中,您现在可以$PATH
通过编辑/etc/wsl.conf
文件来禁用添加 Windows 路径。您可能需要重新启动 WSL 会话才能使此更改生效。
其内容示例如下:
[interop]
appendWindowsPath=false
Run Code Online (Sandbox Code Playgroud)
更多信息可以在这里找到。
归档时间: |
|
查看次数: |
7818 次 |
最近记录: |