不能在我的 windows 10 上 运行 bash 和 Windows 10 上的 linux 子系统
Cannot run bash on my windows 10 and linux subsystem on my Windows 10
- 我启用了"Windows Subsystem for Linux"
- 我已经切换到"Developer mode"
重新启动我的电脑。
下载了一个Linux系统(Ubuntu)
我 PowerShell -
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804-lte -OutFile Ubuntu.appx -UseBasicParsing
添加 AppxPackage .\Ubuntu.appx
运行 Linux inside Windows 10 - 不起作用
当我从控制台发出 运行 bash 命令时,我得到以下信息:
bash 和 ubuntu 似乎已安装但无法正常工作
已编辑:
我也收到此错误:
打开管理员 powershell 终端
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
重启
下载 linux 发行版:https://docs.microsoft.com/en-us/windows/wsl/install-manual
在 powershell 终端中
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing
移动到系统 c:/_distros/ 上的所需位置,然后重命名并通过 powershell 提取二进制文件
Rename-Item Ubuntu.appx Ubuntu.zip
Expand-Archive Ubuntu.zip Ubuntu
将您的发行版路径添加到 Windows 环境路径(本例中为 C:\Distros\Ubuntu),例如使用 Powershell:
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:\_distros\Ubuntu", "User")
运行 ubuntu.exe 安装
- 我启用了"Windows Subsystem for Linux"
- 我已经切换到"Developer mode" 重新启动我的电脑。
下载了一个Linux系统(Ubuntu) 我 PowerShell -
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804-lte -OutFile Ubuntu.appx -UseBasicParsing
添加 AppxPackage .\Ubuntu.appx
运行 Linux inside Windows 10 - 不起作用
当我从控制台发出 运行 bash 命令时,我得到以下信息:
bash 和 ubuntu 似乎已安装但无法正常工作
已编辑:
我也收到此错误:
打开管理员 powershell 终端
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
重启
下载 linux 发行版:https://docs.microsoft.com/en-us/windows/wsl/install-manual
在 powershell 终端中
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing
移动到系统 c:/_distros/ 上的所需位置,然后重命名并通过 powershell 提取二进制文件
Rename-Item Ubuntu.appx Ubuntu.zip
Expand-Archive Ubuntu.zip Ubuntu
将您的发行版路径添加到 Windows 环境路径(本例中为 C:\Distros\Ubuntu),例如使用 Powershell:
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:\_distros\Ubuntu", "User")
运行 ubuntu.exe 安装