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
示例:
建议阅读
- [重要]微软安全漏洞通告修补通告:(查看: 5842)
- Windows系统Hang(停止响应)的处理(查看: 13091)
- Centos使用firewall封攻击IP IP段(查看: 1893)
- SSH 登录时出现如下错误:Disconnected:No supported authentication methods available(查看: 65041)
- shell中too many arguments错误的解决方法(查看: 1517)