How to Restart WSL on Windows 11 and Windows 10

A person using a Windows 11 laptop.

Key Takeaway:

  • To restart WSL, open the Start menu, find PowerShell, click Run as Administrator, choose Yes, type the Get-Service WslService | Restart-Service command, and press Enter.

Want to restart WSL (Windows Subsystem for Linux) on your Window PC but aren’t quite sure how to do that? It’s easier than you think, and you can even restart just the specific Linux distros you may have installed. We’ll show you how to do that on your Windows 11 or Windows 10 computer.

Restart the Entire Windows Subsystem for Linux

It’s unlikely for you to need to restart WSL as a whole unless you’re having an issue affecting the entire subsystem on your computer. This is also much less efficient than restarting specific Linux distros for small-scale troubleshooting.

To reboot WSL on your machine, you have to restart either of the two services: LxssManager and WSL Service. Below are three ways to approach this.

Way 1. Using Command Prompt

Open the Start menu and search for command prompt. From the quick actions provided in the search results, click Run as administrator. Choose Yes in the User Account Control dialog to proceed.

"Run as administrator" highlighted for Command Prompt in Start menu.

In the elevated Command Prompt interface, run the following commands one by one:

net stop LxssManager

net start LxssManager

If Command Prompt tells you that the service name is invalid, replace LxssManager with WslService:

net stop WslService

net start WslService

net stop and start commands in Command Prompt.

This can happen when LxssManager is missing from the official list of services running on your computer. WSL Service is the correct one to restart if you installed WSL from the Microsoft Store. It might also be the only service available for WSL 2.

Way 2. Using PowerShell

The same concept applies when you prefer to use PowerShell over Command Prompt. You only need to use a different set of commands.

Type powershell in the Start menu. Then, choose Run as Administrator from the quick options displayed in the results. Click Yes when asked to confirm in the User Account Control dialog.

"Run as Administrator" highlighted for PowerShell in Start menu.

In PowerShell, run the following command:

Get-Service LxssManager | Restart-Service

Again, if LxssManager is unavailable on your machine, replace it with WslService in the command as follows:

Get-Service WslService | Restart-Service

"Get-Service WslService | Restart-Service" command in PowerShell.

Way 3. Using Services

If you prefer a graphical method, restart LxssManager or WslService in the Services utility, instead. Here’s how.

Launch Run by pressing Windows + R on your keyboard. Type services.msc and press Enter. This will open the Services utility.

"services.msc" typed in Run.

In Services, find LxssManager or WSL Service. Right-click it and, from the context menu, choose Restart.

"Restart" highlighted for "WSL Service" in Services.

Restart a Specific Linux Distro

You can use wsl.exe commands to restart specific Linux distros. They work on both PowerShell and Command Prompt, as long as they’re run with administrator access. In this example, we will use elevated PowerShell in the Terminal app.

Note: While it’s available by default in Windows 11, Terminal might be missing in some versions of Windows 10. You can use the old PowerShell or Command Prompt to do the steps instead. Alternatively, install Terminal.

Right-click Start and choose Terminal (Admin) from the Power User Menu. In the User Account Control dialog, choose Yes to allow administrator permissions.

"Terminal (Admin)" highlighted in Power User Menu.

This will open an elevated PowerShell tab in Terminal. To view all your installed Linux distros, run this command:

wsl --list

"wsl --list" command in PowerShell.

Then, to stop a specific distro, run:

wsl --terminate [distro-name]

Replace [distro-name] with the name of the specific distribution that you want to restart. For example, you can type wsl –terminate Ubuntu in the command line.

"wsl --terminate Ubuntu" command in PowerShell.

By now, your Linux distribution will shut down. To complete the restart process, you can re-launch your distro with this command:

wsl --distribution [distro-name]

"wsl --distribution Ubuntu" command in PowerShell.

Restart All Installed Linux Distros

You can also choose to restart all installed Linux distros in a single command. In an elevated PowerShell or Command Prompt interface, run:

wsl --shutdown

"wsl --shutdown" command in PowerShell.

Then, run your distro again to complete the restart process.

And you’re good to go. Unless you’re facing some serious issue with your Windows Subsystem for Linux, always begin by restarting your Linux distros before rebooting WSL in its entirety. If restarts don’t resolve the errors you encounter, consider uninstalling WSL as a last resort.