![windows子系统wsl](https://i-blog.csdnimg.cn/blog_migrate/33218d1494d52030f67c61892b7e522a.png)
windows子系统wsl
Windows Subsystem For Linux is a Windows hosting container technology used to run Linux distributions on a Windows Nt Kernel. In this tutorial, we will learn what is Windows Subsystem for Linux, How To Enable/Install WSL and how to install and run different Linux distributions?
Windows Linux子系统是一种Windows托管容器技术,用于在Windows Nt内核上运行Linux发行版。 在本教程中,我们将学习什么是Linux的Windows子系统,如何启用/安装WSL以及如何安装和运行不同Linux发行版?
什么是Linux的Windows子系统? (What Is Windows Subsystem For Linux?)
Windows Subsystem for Linux aka WSL is a container system that can be used to run Linux distributions on a Windows operating system. This makes us run Linux commands on a Windows operating system container. WSL is used by the system administrator to test some features and especially by developers in order to run and test different tools, frameworks and programming languages.
Linux的Windows子系统(又名WSL)是一个容器系统,可用于在Windows操作系统上运行Linux发行版。 这使我们在Windows操作系统容器上运行Linux命令。 系统管理员(特别是开发人员)使用WSL测试某些功能,以运行和测试不同的工具,框架和编程语言。
从Windows功能启用WSL (Enable WSL From Windows Features)
We can enable or install the WSL from the Windows Features
menu. Windows Features windows can be opened in different ways where typing Windows Features
into the Start Menu
search box is like below.
我们可以从Windows Features
菜单启用或安装WSL。 Windows功能窗口可以通过以下不同方式打开,在“ Start Menu
搜索框中键入Windows Features
如下所示。
![Windows Features From Start Menu](https://i-blog.csdnimg.cn/blog_migrate/466b53dfc2098c45b901a434aa8be681.png)
Alternatively, we can access the Windows Features windows from Control Panel
->Programs and Features
from the left panel `Turn Windows features on or off.
或者,我们可以从“ Control Panel
->“ Programs and Features
”从左面板访问“ Windows功能”窗口,打开或关闭Windows功能。
![Windows Features From Control Panel](https://i-blog.csdnimg.cn/blog_migrate/4d7e85f3687f8c27fcabe0325a9e4f67.png)
We will see the following screen about Windows Features. We will find the Windows Subsystem for Linux
elements and select the checkbox and then click to the OK
我们将看到有关Windows功能的以下屏幕。 我们将找到Windows Subsystem for Linux
的Windows Subsystem for Linux
元素,并选中该复选框,然后单击OK
![Install WSL From Windows Features](https://i-blog.csdnimg.cn/blog_migrate/ddaf831e2ad2c820208776e20ce09d6b.png)
The WSL feature will be automatically installed. After the installation is complete we will see the following screen which will request us to restart the system in order to complete the WSL installation. We will click to the Restart now
button which will reboot the system.
WSL功能将自动安装。 安装完成后,我们将看到以下屏幕,该屏幕将要求我们重新启动系统以完成WSL安装。 我们将单击“立即Restart now
按钮,它将重启系统。
![Reboot Windows For WSL Installation](https://i-blog.csdnimg.cn/blog_migrate/6bc20e83f82060f7862c56b077fe42ff.png)
从PowerShell启用WSL(Enable WSL From PowerShell)
We can also install WSL from the PowerShell command line. We will use the Enable-WindowsOptionalFeature
command. As this installation is an administrative task we need to have Administrator rights while using PowerShell. From the Start Menu
we will type PowerShell
which will list PowerShell shell. We will right-click to the Windows PowerShell
app and click to the Run as administrator
like below.
我们还可以从PowerShell命令行安装WSL。 我们将使用Enable-WindowsOptionalFeature
命令。 由于此安装是一项管理任务,因此在使用PowerShell时,我们需要具有管理员权限。 在Start Menu
我们将键入PowerShell
,它将列出PowerShell Shell。 我们将右键单击Windows PowerShell
应用,然后单击Run as administrator
身份Run as administ