我正在运行 WSL2。如果我echo $PATH
在 WSL2 终端中,我会看到
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
/usr/local/games:/usr/lib/wsl/lib:
/mnt/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/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/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/Microsoft SQL Server/140/Tools/Binn/:
/mnt/c/Program Files/dotnet/:
/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:
/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:
/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/site/bin:
/mnt/c/Strawberry/perl/bin:/mnt/c/Program Files/MongoDB/Server/4.4/bin:
/mnt/c/Program Files (x86)/Calibre2/:/mnt/c/Program Files/PuTTY/:
/mnt/c/Program Files/Docker/Docker/resources/bin:
/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Program Files/Git/cmd:
/mnt/c/HashiCorp/Vagrant/bin:/mnt/c/Program Files/Amazon/AWSCLIV2/:
/mnt/c/Ruby27-x64/bin:/mnt/c/Ruby27-x64/bin:
/mnt/c/Users/cmari/AppData/Local/Microsoft/WindowsApps:
/mnt/c/Program Files/JetBrains/PyCharm Community Edition 2019.3.4/bin:
/mnt/c/Program Files/Git/bin/git.exe:/mnt/c/Users/cmari/Downloads/python-3.8.2:
/mnt/c/Users/cmari/Downloads/lxml-4.5.0-cp38-cp38-win_amd64.whl:
/mnt/c/Users/cmari/Downloads/libxml2_python-2.9.3-cp27-none-win_amd64.whl:
/mnt/c/Users/cmari/AppData/Local/GitHubDesktop/bin:
/mnt/c/Users/cmari/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
但是,如果我ruby -v
在 WSL2 终端中检查,它会抱怨Command ruby not found,
,即使在我的常规 Windows 命令提示符中,它会乖乖地吐出版本号。我该如何帮助我的 WSL2 找到 Ruby?