Windows Subsystem for Linux 环境变量
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$