WSL2管理员PowerShell无法识别已安装发行版且--install命令仅返回使用提示的问题求助
WSL2管理员PowerShell无法识别已安装发行版且--install命令仅返回使用提示的问题求助
我正在跟着教程学习,目前进度到了大概15分钟的位置。之前我在管理员账户的PowerShell里安装了WSL2,现在用普通用户账户登录系统后,安装了Docker Desktop和Ubuntu发行版,之后重启了电脑。
但当我再次用管理员账户打开PowerShell时,它完全识别不到我已经安装的Ubuntu,也看不到Docker Desktop相关内容,执行命令的输出如下:
PS C:\windows\system32> wsl -l -v Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore PS C:\windows\system32> wsl.exe -d Ubuntu There is no distribution with the supplied name. PS C:\windows\system32> wsl.exe --install Ubuntu Copyright (c) Microsoft Corporation. All rights reserved. Usage: wsl.exe [Argument] [Options...] [CommandLine] Arguments for running Linux binaries: If no command line is provided, wsl.exe launches the default shell. --exec, -e <CommandLine> Execute the specified command without using the default Linux shell. -- Pass the remaining command line as is.
补充一下:用普通用户账户时,我能正常打开Ubuntu应用和Docker Desktop,但管理员权限的PowerShell就是识别不了。请问我该怎么解决这个问题?另外,为什么执行wsl.exe --install Ubuntu的时候,只返回了使用提示而不是正常安装呢?
备注:内容来源于stack exchange,提问作者MrSnrub
相关产品推荐
相关产品推荐

