windows 10 安装Linux子系统

Windows 10 内置了Linux子系统,目前支持多个发行版

如:Ubuntu,openSUSE Leap 42,SUSE Linux enterprise server 12
Debian,Kali Linux

启用方式如下:

1、右键开始菜单打开Windows PowerShell(管理员)

输入以下命令

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

自动开始安装Linux子系统,完成后会提示重启电脑

注:以上适用 Windows bulid 16215 或者之后的版本,早于此前的版本,请使用lxrun命令来自行安装

2、打开Microsoft store,搜索wsl(全称Windows Subsystem for Linux

选择你想安装的版本获取安装即可

说明:如系统内没有Microsoft store,或者诸如下面的问题

There are several scenarios in which you may not be able (or want) to, install WSL Linux distros via the Microsoft Store. Specifically, you may be running a Windows Server or Long-Term Servicing (LTSB/LTSC) desktop OS SKU that doesn’t support Microsoft Store, or your corporate network policies and/or admins to not permit Microsoft Store usage in your environment.

可能你需要以下方式来安装
Manually download WSL distro packages