欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Windows Subsystem for Linux

程序员文章站 2022-06-12 10:32:09
...

https://docs.microsoft.com/en-us/windows/wsl/about

https://docs.microsoft.com/en-us/windows/wsl/install-win10

Windows Subsystem for Linux Installation Guide for Windows 10

Install the Windows Subsystem for Linux

Before installing any Linux distros for WSL, you must ensure that the "Windows Subsystem for Linux" optional feature is enabled:

  1. Open PowerShell as Administrator and run:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Restart your computer when prompted.

Install your Linux Distribution of Choice

To download and install your preferred distro(s), you have three choices:

  1. Download and install from the Windows Store (see below)
  2. Download and install from the Command-Line/Script (read the manual installation instructions)
  3. Download and manually unpack and install (for Windows Server - instructions here)

 在windows store里面搜索wsl,然后找到Ubuntu版本

安装完启动,需要创建Ubuntu的账号https://docs.microsoft.com/en-us/windows/wsl/user-supportWindows Subsystem for Linux

创建用户成功后,提示

Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.