[英]Is it possible install Ubuntu in Windows 10 WSL without Microsoft Store?
On my work are not allowed to install apps from the Microsoft Store.我的工作不允许从 Microsoft Store 安装应用程序。 Yes, this is a bank, that not supported Windows 10 (it's hell).是的,这是一家不支持 Windows 10 的银行(简直是地狱)。
Is it possible to install Ubuntu in WSL without downloading it from the app store?是否可以在 WSL 中安装 Ubuntu 而无需从应用商店下载?
Or is it possible to download Ubuntu app without Microsoft Store and then install it?或者是否可以在没有 Microsoft Store 的情况下下载 Ubuntu 应用程序然后安装它?
Yes, it is possible to download the app without the Store.是的,可以在没有商店的情况下下载该应用程序。 Some available distributions are listed in the Manual Installation section of the MS guide ( https://docs.microsoft.com/en-us/windows/wsl/install-manual ) MS 指南的“手动安装”部分列出了一些可用的发行版 ( https://docs.microsoft.com/en-us/windows/wsl/install-manual )
The actual manual installation instructions are hidden in the Server Install section of the manual ( https://docs.microsoft.com/en-us/windows/wsl/install-on-server ), but my understanding is that you can just run the .appx file you downloaded and it should work anyway.实际的手动安装说明隐藏在手册的服务器安装部分( https://docs.microsoft.com/en-us/windows/wsl/install-on-server ),但我的理解是您可以运行您下载的 .appx 文件,它应该可以正常工作。
Whether it's wise to install WSL/Ubuntu on a work computer that you don't control is another question, but one which only you can answer.在您无法控制的工作计算机上安装 WSL/Ubuntu 是否明智是另一个问题,但只有您可以回答。
I had the same problem, could do it like this (from PowerShell):我有同样的问题,可以这样做(来自 PowerShell):
# go into some folder into which you want the file to be downloaded
cd <somefolder>
# download Ubuntu 20.04
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
# install downloaded *.appx file
Add-AppxPackage .\Ubuntu.appx
Afterwards I did Windows + S and typed "Ubuntu" to show the installed app, then executed it to finish setup (new user name + password must be given).之后我做了Windows + S并输入“Ubuntu”以显示已安装的应用程序,然后执行它以完成设置(必须提供新用户名 + 密码)。
I checked the success doing: wsl --list --verbose
and received this:我检查了成功: wsl --list --verbose
并收到了这个:
NAME STATE VERSION
Ubuntu-20.04 Running 1
So finally, I needed to convert my Ubuntu to WSL2 like this:所以最后,我需要像这样将我的 Ubuntu 转换为 WSL2:
wsl --set-version Ubuntu-20.04 2
Voila!瞧!
Yes, It is possible to install Ubuntu without opening the store.是的,可以在不打开商店的情况下安装 Ubuntu。
Open settings in windows and enable developer mode.在 Windows 中打开设置并启用开发人员模式。
Once the developer mode is enabled, Go to Windows search and Type Bash.启用开发人员模式后,转到 Windows 搜索并键入 Bash。
It will open Bash command prompt.它将打开 Bash 命令提示符。 Allow it to download Ubuntu automatically.允许它自动下载 Ubuntu。
Cheers!!!干杯!!!
I created a powershell script to install wsl2 with optional X-Windows and Pulse Audio support.我创建了一个 powershell 脚本来安装带有可选的 X-Windows 和 Pulse Audio 支持的 wsl2。 I also captured my experience with installing wsl without Store access in the Readme.md.我还在 Readme.md 中记录了在没有 Store 访问权限的情况下安装 wsl 的经验。
For the detail see here: https://github.com/andras-varro/wsl2i有关详细信息,请参见此处: https : //github.com/andras-varro/wsl2i
I believe these are the most important points:我认为这些是最重要的几点:
Check if your installation supports WSL2: Windows logo key + R, type winver [enter].检查您的安装是否支持 WSL2:Windows 徽标键 + R,键入 winver [enter]。 You should have Version 1903 or higher, with Build 18362 or higher您应该拥有版本 1903 或更高版本,以及 Build 18362 或更高版本
Enable WSL2启用 WSL2
Install a Linux distro安装 Linux 发行版
Test your WSL2测试你的 WSL2
You can use winget (Windows Package Manager):您可以使用winget (Windows 包管理器):
winget install -e --id Canonical.Ubuntu
To get another version than the "latest", search for them via:要获得“最新”之外的另一个版本,请通过以下方式搜索它们:
winget search -s winget Ubuntu
If you omit the -s winget
option, the versions from other sources like the Microsoft store will be displayed too.如果省略-s winget
选项,来自其他来源(如 Microsoft 商店)的版本也会显示。
Iin an administrator PowerShell or Windows Command Prompt and then restarting your machine:在管理员 PowerShell 或 Windows 命令提示符下,然后重新启动您的机器:
wsl --install --distribution Ubuntu
You can get distributions list by:您可以通过以下方式获取分发列表:
wsl --list --online
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.