我尝试在 Windows Server 2019 计算机上通过 WSL 运行 Ubuntu 1804,但遇到了问题:
PS C:\Users\Administrator\Ubuntu> .\ubuntu1804.exe
The system cannot find the path specified.
看起来 Windows 找不到 ubuntu1804.exe 想要做的事情。
我在正确的目录中:
PS C:\Users\Administrator\Ubuntu> ls
Directory: C:\Users\Administrator\Ubuntu
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 4/14/2019 11:03 AM AppxMetadata
d----- 4/14/2019 11:03 AM Assets
------ 8/17/2018 3:15 AM 212438 AppxBlockMap.xml
------ 8/17/2018 3:15 AM 3835 AppxManifest.xml
------ 8/17/2018 3:17 AM 11112 AppxSignature.p7x
------ 8/17/2018 3:15 AM 223983209 install.tar.gz
------ 8/17/2018 3:15 AM 5400 resources.pri
------ 8/17/2018 3:15 AM 211968 ubuntu1804.exe
------ 8/17/2018 3:15 AM 744 [Content_Types].xml
我遵循了以下说明:https://docs.microsoft.com/en-us/windows/wsl/install-on-server
我也做了:
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:\Users\Administrator\Ubuntu", "User")