windows子系统wsl_适用于Linux的Windows子系统(WSL)安装和使用教程,并带有示例...

windows子系统wsl

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
Windows Features From Start Menu
Windows功能从“开始”菜单

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
Windows Features From Control Panel
Windows从控制面板功能

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 LinuxWindows Subsystem for Linux元素,并选中该复选框,然后单击OK

Install WSL From Windows Features
Install WSL From Windows Features
从Windows功能安装WSL

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
Reboot Windows For WSL Installation
重新启动Windows以进行WSL安装

从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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值