Windows Subsystem for Linux 环境变量

Posted 武大路飞

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows Subsystem for Linux 环境变量相关的知识,希望对你有一定的参考价值。

WSL(Windows Subsystem for Linux )的环境变量是包含Linux子系统和Windows系统的,测试如下:

[email protected]:/mnt/c/Windows/System32$ python -V
Python 2.7.12
[email protected]-PC:/mnt/c/Windows/System32$ python.exe -V
Python 2.7.14
[email protected]-PC:/mnt/c/Windows/System32$ python3 -V
Python 3.5.2
[email protected]-PC:/mnt/c/Windows/System32$ python3.exe -V
Python 3.6.3
[email protected]-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 <选定的软件包>
[email protected]-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)
[email protected]-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
[email protected]-PC:/mnt/c/Windows/System32$

 

以上是关于Windows Subsystem for Linux 环境变量的主要内容,如果未能解决你的问题,请参考以下文章

Windows Subsystem For Linux

Windows Subsystem for Linux(wsl)使用

Windows Subsystem for Linux 环境变量

Where windows subsystem for linux (WSL) File/Directory Location?

使用WSL(Windows Subsystem for Linux)挂载usb设备

wsl(Windows Subsystem for Linux)安装简易指南