You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 12:55:29