Skip to content

Instantly share code, notes, and snippets.

@netnr netnr/wsl
Created Aug 1, 2019

Embed
What would you like to do?
Windows Subsystem Linux(WSL)安装
# 教程链接
https://docs.microsoft.com/zh-cn/windows/wsl/install-manual
# 使用开发人员模式
设置》更新和安全》开发中选项》开发人员模式
# 添加 Windows 应用程序
# 适用于 Linux 的 Windows 子系统,或 PowerShell 执行命令安装
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
# 添加 虚拟机平台,wsl2
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
# 包下载链接
# Ubuntu 18.04
https://aka.ms/wsl-ubuntu-1804
# Ubuntu 18.04 ARM
https://aka.ms/wsl-ubuntu-1804-arm
# Ubuntu 16.04
https://aka.ms/wsl-ubuntu-1604
# Debian GNU/Linux
https://aka.ms/wsl-debian-gnulinux
# Kali Linux
https://aka.ms/wsl-kali-linux
# OpenSUSE
https://aka.ms/wsl-opensuse-42
# SLES
https://aka.ms/wsl-sles-12
# CentOS GitHub下载
https://github.com/yuk7/CentWSL/releases
# Appx 操作命令
# 安装一个appx程序包
Add-AppxPackage <包完整路径>
# 获取Appx列表
Get-AppxPackage
# 卸载一个appx程序包
Remove-AppxPackage <PackageFullName>
# Appx 命令帮助文档
https://docs.microsoft.com/zh-cn/powershell/module/appx
# 安装目录,查看 InstallLocation 值
Get-AppxPackage
# 备份
xcopy Linux Linux.bak /E
# 修改 root 密码
sudo passwd
# 输入当前用户密码,再输入 root 新密码
# 切换 root
su root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.