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
示例:
建议阅读
- Linux下查怎么查看端口进程(查看: 1488)
- fsck 命令详解(查看: 1981)
- Ubuntu18.04 永久修改DNS的方法(查看: 14670)
- 释放硬件保留内存(查看: 562)
- CentOS查看系统运行时间(查看: 3621)