windows server 2019 安装linux子系统
1.启用Windows子系统(WSL)功能
a.以管理员身份打开PowerShell并运行以下命令以在Windows上启用Windows Subsystem for Linux(WSL)功能
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
b.安装好后会提示重启服务器,重启后继续
2.下载ubuntu-1804
curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804
3.解压缩并安装命令
Rename-Item ubuntu-1804.appx ubuntu-1804.zip
Expand-Archive ubuntu-1804.zip ubuntu1804
4.进入文件夹后安装
cd ubuntu1804
.\ubuntu1804.exe
5.完成后创建用户和用户密码
PS C:\Users\Administrator\ubuntu1804> .\ubuntu1804.exe
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
6.完成
Ubuntu更新系统命令
sudo apt update && sudo apt upgrade
sudo apt install ansible
示例:

建议阅读
- Windows系统Hang(停止响应)的处理(查看: 13310)
- Windows系统开始后一直是蓝色背景屏幕(非蓝屏crash)的解决方案(查看: 8970)
- fsck 命令详解(查看: 2318)
- Windows添加软件开机启动项(查看: 965)
- Linux为新硬盘创建LVM(查看: 1511)
中国
中国香港特别行政区
韩国
日本
新加坡
文莱
阿富汗
不丹
美国
墨西哥
巴拿马
巴哈马
古巴
多米尼加
格陵兰
危地马拉
阿根廷
玻利维亚
巴西
智利
哥伦比亚
厄瓜多尔
法属圭亚那
巴拉圭
美国云服务器
日本云服务器
新加坡云服务器
