1. 程式人生 > >Windows Subsystem for Linux 環境變量

Windows Subsystem for Linux 環境變量

app environ game appdata sof less microsoft program /usr

WSL(Windows Subsystem for Linux )的環境變量是包含Linux子系統和Windows系統的,測試如下:

wy@WY-PC:/mnt/c/Windows/System32$ python -V
Python 2.7.12
wy@WY-PC:/mnt/c/Windows/System32$ python.exe -V
Python 2.7.14
wy@WY-PC:/mnt/c/Windows/System32$ python3 -V
Python 3.5.2
wy@WY-PC:/mnt/c/Windows/System32$ python3.exe -V
Python 3.6.3
wy@WY-PC:/mnt/c/Windows/System32$ java -version 程序 java 已包含在下列軟件包中: * default-jre * gcj-5-jre-headless * openjdk-8-jre-headless * gcj-4.8-jre-headless * gcj-4.9-jre-headless * openjdk-9-jre-headless 請嘗試:sudo apt install <選定的軟件包> wy@WY-PC:/mnt/c/Windows/System32$ java.exe -version java version
"1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) wy@WY-PC:/mnt/c/Windows/System32$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/d/Program Files/Java/jdk1.8.0_25/bin:/mnt/d/Program Files/Java/jdk1.8
.0_25/jre/bin:/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/e/Android/sdk/platform-tools:/mnt/e/Android/sdk/tools:/mnt/c/Users/wy/AppData/Local/Programs/Python/Python36/Scripts:/mnt/c/Users/wy/AppData/Local/Programs/Python/Python36:/mnt/c/Users/wy/AppData/Local/Microsoft/WindowsApps:/mnt/d/Program Files/Java/jdk1.8.0_25/jre/bin:/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/e/Android/sdk/platform-tools:/mnt/c/Python27/Scripts:/mnt/c/Python27 wy@WY-PC:/mnt/c/Windows/System32$

Windows Subsystem for Linux 環境變量