首页 > 其他分享 >win10安装wsl

win10安装wsl

时间:2022-10-11 01:11:07浏览次数:104  
标签:appx Linux wsl download install Ubuntu win10 安装

 

一、使用LxRunOffline工具安装管理wsl:

  1. 下载LxRunOffline,lxRunOffline下载最新的发行版本
  2. 下载wsl离线包,WSL_download下载一个喜欢的WSL发行版本。
  3. 将下载的wsl包后缀名appx修改为zip并解压为tar压缩包。
  4. 用lxrunoffline按如下格式安装压缩包

# LxRunOffline install -n <子系统名称> -d <安装路径> -f <安装包>.tar.gz
LxRunOffline install -n ubuntu2004 -d D:/wsl/ubuntu2004 -f d:/wsl//ubuntu2004.tar.xz

 

二、按照微软官网的离线安装说明进行安装:

原文:https://learn.microsoft.com/en-us/windows/wsl/install-manual

Downloading distributions

There are some scenarios in which you may not be able (or want) to, install WSL Linux distributions using the Microsoft Store. You may be running a Windows Server or Long-Term Servicing (LTSC) desktop OS SKU that doesn't support Microsoft Store, or your corporate network policies and/or admins do not permit Microsoft Store usage in your environment. In these cases, while WSL itself is available, you may need to download Linux distributions directly.

If the Microsoft Store app is not available, you can download and manually install Linux distributions using these links:

This will cause the <distro>.appx packages to download to a folder of your choosing.

If you prefer, you can also download your preferred distribution(s) via the command line, you can use PowerShell with the Invoke-WebRequest cmdlet. For example, to download Ubuntu 20.04:

PowerShell
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing

 Tip

If the download is taking a long time, turn off the progress bar by setting $ProgressPreference = 'SilentlyContinue'

You also have the option to use the curl command-line utility for downloading. To download Ubuntu 20.04 with curl:

Console
curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004

In this example, curl.exe is executed (not just curl) to ensure that, in PowerShell, the real curl executable is invoked, not the PowerShell curl alias for Invoke-WebRequest.

Once the distribution has been downloaded, navigate to the folder containing the download and run the following command in that directory, where app-name is the name of the Linux distribution .appx file.

Powershell
Add-AppxPackage .\app_name.appx

Once the Appx package has finished downloading, you can start running the new distribution by double-clicking the appx file. (The command wsl -l will not show that the distribution is installed until this step is complete).

If you are using Windows server, or run into problems running the command above you can find the alternate install instructions on the Windows Server documentation page to install the .appx file by changing it to a zip file.

Once your distribution is installed, follow the instructions to create a user account and password for your new Linux distribution.

标签:appx,Linux,wsl,download,install,Ubuntu,win10,安装
From: https://www.cnblogs.com/dingbj/p/16777934.html

相关文章

  • 安装软件致命错误:fatal error: error writing to /tmp/ccEmEL8S.s: No space left on
    今天安装一个开源软件s3fs,结果在make的时候报错:s3fs.cpp:3872:1:fatalerror:errorwritingto/tmp/ccEmEL8S.s:Nospaceleftondevicecompilationterminated.m......
  • Linux安装配置类似mac下的docky
    百度经验:​​ubuntu安装配置类似mac下的docky​​亲手打造自己的Linux桌面环境:​​http://os.51cto.com/art/201510/493896_all.htm​​Dock是一种图形用户界面元素,允许用户......
  • nvisworks202保姆级安装步骤
    nvisworks2021WIN1064位安装步骤:1.先下载NV_CN_2021软件安装包到电脑磁盘里,并解压缩,安装前先断网,然后找到Autodesk_Nvisworks_Manage_2021_Multilingual_Win_64bit_dlm_00......
  • Jupyter 安装使用
     Jupyter的官网:​​http://jupyter.org/index.html​​官方文档:​​https://jupyter-notebook.readthedocs.io/en/stable/​​​​https://github.com/jupyter/jupyter/wik......
  • 安装Standalone模式HBase
    所谓Standalone模式HBase,就是只启动一个JVM进程,在这个进程中同时启动了多个后台角色,如:HMaster,单个HRegionServer,以及ZooKeeper服务。下载安装最新版本从这里下载。历史......
  • navisworks2021保姆级下载安装教程
     navisworks2021WIN1064位安装步骤:1.先使用“百度网盘客户端”下载NV_CN_2021软件安装包到电脑磁盘里,并解压缩,安装前先断网,然后找到Autodesk_Navisworks_Manage_2021_......
  • ubuntu 22.04 安装qqmusic问题
    Fedora安装QQ音乐打开/usr/share/applications/qqmusic.desktop[DesktopEntry]Name=qqmusicExec=/opt/qqmusic/qqmusic%U--no-sandboxTerminal=falseType=Appl......
  • Linux 下安装Redis
    下载地址:http://redis.io/download,下载最新稳定版本。本教程使用的最新文档版本为2.8.17,下载并安装:1#wgethttp://download.redis.io/releases/redis-6.0.8.tar.gz2......
  • 玩转树莓派[08安装x11vnc并设置开机自动启动]
    title:玩转树莓派[08:安装x11vnc并设置开机自动启动]excerpt:没钱买显示器,论有界面的重要性~tags:[raspberry,基地2.0,系统,uos,x11vnc]categories:[学习,ra......
  • CentOS7下安装python3.8卸载3.6
    title:CentOS7下安装python3.8卸载3.6excerpt:VM记得拍快照!拍快照!快照!tags:[语音识别,kaldi,python3,python2,centos7]categories:[学习,python][学习,语......