网站解析密码,网站被收录后又被提出了,建筑网片产品资料,企业内部管理系统网站建设视频
https://www.bilibili.com/video/BV1uH4y1W7UX特殊开启–Hyper-V虚拟机
把一下代码保存到【a.bat】的执行文件中#xff0c;进行Hyper-V虚拟机的安装开启【Windows 批处理文件 (.bat)】
pushd %~dp0
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mu…视频
https://www.bilibili.com/video/BV1uH4y1W7UX特殊开启–Hyper-V虚拟机
把一下代码保存到【a.bat】的执行文件中进行Hyper-V虚拟机的安装开启【Windows 批处理文件 (.bat)】
pushd %~dp0
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum hyper-v.txt
for /f %%i in (findstr /i . hyper-v.txt 2^nul) do dism /online /norestart /add-package:%SystemRoot%\servicing\Packages\%%i
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL查看电脑本版
步骤1:使用 Winget 方式安装 PowerShell
查看是否能更新PowerShell–
winget search Microsoft.PowerShell查看结果为
名称 ID 版本 源
-------------------------------------------------------
PowerShell Microsoft.PowerShell 7.3.1.0 winget
PowerShell Microsoft.PowerShell.Preview 7.4.1.0 winget
PS C:\WINDOWS\system32执行更新
winget install --id Microsoft.Powershell --source winget2新旧版本的powershell 步骤 3- 启用虚拟机功能
安装 WSL 2 之前必须启用“虚拟机平台”可选功能。 计算机需要虚拟化功能才能使用此功能。
以管理员身份打开 【旧版本的】PowerShell 并运行
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartPS C:\WINDOWS\system32 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartDeployment Image Servicing and Management tool
Version: 10.0.22621.2792Image Version: 10.0.22621.3296启用一个或多个功能
[100.0%]
The operation completed successfully.
PS C:\WINDOWS\system32
4下载wsl2的安装包
https://learn.microsoft.com/zh-cn/windows/wsl/install-manual重启
步骤 5 列出已安装的 Linux 发行版【只能使用新版本的powershell】
wsl --list --verbose
wsl --status
wsl --version旧版本的爆出错误 wsl : The term wsl is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1wsl --list --verbose~~~ CategoryInfo : ObjectNotFound: (wsl:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundExceptionPS C:\WINDOWS\system32 wsl2 --list --verbose
wsl2 : The term wsl2 is not recognized as the name of a cmdlet, function, script file, or operable program. Check thespelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1wsl2 --list --verbose~~~~ CategoryInfo : ObjectNotFound: (wsl2:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException
步骤 6 重启计算机
打开【新版本】的Powershell
查看可以安装的linux子系统【查看命令】
wsl --install查看命令
wsl --list --onlinePS C:\Users\luich wsl --list --online
以下是可安装的有效分发的列表。
请使用“wsl --install -d 分发”安装。NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed
PS C:\Users\luich安装某个版本的Ubuntu
wsl --install -d DistroName
我需要下载Ubuntu-22.04
wsl --install -d Ubuntu-22.04用户名:luichun
密码xxxxxxx显示安装
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)