WSL命令执行提示「系统找不到指定文件」的故障求助
WSL命令执行提示「系统找不到指定文件」的故障求助
各位大佬好,遇到个奇怪的问题想求助:
我的系统环境是:
Edition Windows 11 Pro Version 22H2 OS build 22621.1992 Experience Windows Feature Experience Pack 1000.22644.1000.0
我已经在「Windows功能」里勾选启用了Windows Subsystem for Linux,而且在c:\windows\system32目录下确实能看到wsl.exe文件。但不管是在Windows PowerShell还是旧版cmd.exe里执行:
c:\windows\system32\wsl.exe <任意命令或直接运行>
都会收到错误提示:
The system cannot find the file specified.
我已经试过先取消勾选WSL功能、重启系统,再重新勾选启用,但问题依然存在。
UPDATE
之前我都是在PowerShell里运行wsl,刚才尝试用Win+R打开运行框执行wsl,弹出了一个错误对话框:
[Window Title]
C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.0.3.0_x64__8wekyb3d8bbwe\wsl.exe[Content]
Windows cannot find 'C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.0.3.0_x64__8wekyb3d8bbwe\wsl.exe'. Make sure you typed the name correctly, and then try again.[OK]
这到底是怎么回事啊?
备注:内容来源于stack exchange,提问作者Alexey Subbota




