Restart WSL

How to Restart WSL in Windows 11?

Windows Subsystem for Linux is a way to run the Linux operating system in Windows without installing any Third-Party virtual machine. WSL allows users to run the Linux Operating system alongside Windows. Windows has a driver that sits between the NT kernel and Linux kernel mode that does the translation and exposes the virtual files. Its compatibility layer for running Linux binary executables natively on Windows 10/11. Using WSL, you can install the Linux distributions as an app from the Windows Store. You can install any Linux distribution using WSL, you can download and install WSL from Microsoft Store. Find more about Enabling and installing WSL on Windows. Once you install WSL distribution, you can search for the distribution name and launch it from the start menu. Sometimes WSL may act weird and it won’t launch properly. To resolve this issue, we need to restart the WSL, you can restart the WSL using different methods in Windows, this article will guide you to Restart WSL in Windows 11 using different methods.

Restart WSL in Windows 11:

You can restart the WSL using CMD, PowerShell, Windows Services, and from the Task Manager, make sure you have saved all your work on any of the distros you are using, then follow the below method to restart WSL.

Method 1: Using PowerShell

To restart WSL using PowerShell, we can use the WSL command, the same commands will work in Command Prompt also.

Open PowerShell in elevated mode, click on the start menu and search for PowerShell and right click on it, and choose Run as Administrator.

On the PowerShell window type the following command.

wsl –shutdown

This command will gracefully shut down all running WSL instances.

To start the WSL again just type wsl in the elevated PowerShell window.

If you are using multiple distributions, you can open the following distros one by one from the start menu.

Method 2: Restart a Specific Linux Distribution

In case, if you are using multiple WSL distributions and want to restart the specific Distro, you can use the following steps. The following commands can be executed from the PowerShell.

Launch Windows PowerShell in elevated mode.

First check the list of WSL distributions installed on your System. Type the following command to check the List of WSL distributions.

wsl -l -v

This command will display the list of installed Linux distributions and you can see the Name State and WSL version of the Distributions.

Type the following command to disable the specific Linux Distribution.

wsl – t Ubuntu

Replace the distribution name with the specific Distro which you want to stop.

Type the following command to Enable the Specific Linux WSL.

Wsl -d Ubuntu

Replace the distribution name with the specific Distro which you want to start.

using wsl command-Restart WSL

Method 3: Restart WSL using LxssManager Service

“LxssManager” in Windows Services is a system service that plays a crucial role in the operation of the Windows Subsystem for Linux (WSL). This service is responsible for managing the Linux subsystem’s underlying infrastructure, allowing Windows to run Linux distributions and tools directly on the Windows operating system. If you’re using WSL on your Windows machine, the LxssManager service is automatically installed and runs in the background. It’s a critical component for the smooth functioning of WSL, and restarting this service can often resolve issues related to WSL not functioning correctly.

Open Run command by pressing Windows + R and type services.msc and hit enter, this command will open the Services Management console.

Look for the LxssManager service and click on Restart the service, this will stop the service and start it back again.

LxssManager

You can achieve the same using the following PowerShell command.

Restart-Service LxssManager

This command will restart the LxssManager service, and it will restart the Windows Subsystem for Linux.

Method 4: Using Command Prompt

Like PowerShell you can use the Command Prompt to restart the WSL service, there is no specific command to restart the WSL distros, but you can restart the LxssManager which will restart the WSL.

Open Command Prompt in elevated mode and type the following commands to restart the LxssManager.

net stop LxssManager
net start LxssManager
LxssManager-Restart WSL

The first command will stop the service and 2nd will start the LxssManager.

Method 5: Using Task Manager

With the help of Task Manager you can easily access the Services Management console, From the Windows Services Management console we can easily restart the LxssManager, which is the core component of WSL.

Open Task Manger by pressing Ctrl + Alt + Del.

Click on the Services tab and then click on Open Services. This will open the Windows services console.

Look for LxssManager service and click on Restart the service, this will stop the service and start it back again.

How to Reset WSL distro?

To reset any WSL distro, search for the Installed Linux distribution on your system, right-click on it, and choose App Settings, Under App Settings you can find the Reset section, click on Reset button to reset the app, Resetting the app will delete all the app data.

How to Enable WSL in Windows?

How to Install WSL using Command Prompt in Windows 11?

Read Also:

Fix Process Exited with Code 4294967295 in WSL on Windows 11

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top