WSL Service无法启动

巧欣 梁 0 Reputation points
2024-07-31T01:56:39.5033333+00:00

这两天在安装dockers,开启WSL服务,但是一直没有安装成功,做完就彻底删除重新下载,然后在打开WSL Service时提示找不到系统指定的文件

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jacen Wang 970 Reputation points Microsoft Vendor
    2024-09-15T04:58:20.3833333+00:00

    Hello,

    Thank you for posting in the Microsoft Community forum.

    You can try the following steps to troubleshoot the problem:

    1. Enable WSL function:

    Press Win + R to open Run, enter ptinalfeatures, and press Enter to open the Windws Features screen. Ensure that Windws subsystem for Linux and Virtual Machine Platform are selected. Then restart the computer.

    1. Check whether WSL is installed:

    Open a command prompt or PwerShell and type wsl --list to see which Linux distributions are installed. If nothing is displayed, WSL may not be installed correctly.

    Check that the C:\Windws\System32\wsl.exe file exists. If it does not exist, try reinstalling WSL.

    1. Update WSL:

    Make sure your WSL version is up to date. It can be updated with the following command:

    wsl --update

    1. Reinstall WSL:

    To run the command prompt or PwerShell as an administrator, enter the following command:

    wsl --shutdwn

    wsl --unregister <distributin_name>

    wsl --install --distributin <distributin_name>

    For example, if you are using Ubuntu, you can replace <distributin_name> with Ubuntu.

    Best regards

    Jacen

    ——————————————————————————————————

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.