What’s WSL?
Windows Subsystem for Linux (WSL) is a compatibility layer developed by Microsoft that allows you to run a Linux environment directly on Windows. It provides a way for developers and users to utilize Linux tools, run command-line utilities, and even install and run Linux distributions from the Microsoft Store. WSL bridges the gap between the Windows and Linux ecosystems, enabling users to leverage the power of both operating systems simultaneously. With WSL, you can enjoy the benefits of a Linux environment without the need for virtualization or dual-boot setups, making it an invaluable tool for developers and enthusiasts alike.
However, like any software, WSL may encounter issues or require a restart at times. In this article, we will walk you through the process of restarting WSL in Windows 10/11, ensuring that you can continue working in your Linux environment without interruptions.
Restart WSL in Windows 10/11
To restart WSL, you’ll need to launch either PowerShell or Command Prompt with administrative privileges. To do this, right-click on the Start menu and select Windows PowerShell (Admin) or Command Prompt (Admin).
Then, you can simply run the following command to stop all active WSL instances:
wsl --shutdown
Check if it works with:
wsl -l -v
You should see something like this:
Now, open any WSL instance and the service will start automatically.
Restart the Lxssmanager service in PowerShell
In case you’re not familiar with command line, you can also choose to restart the Lxssmanager as an option:
NOTE: This works with Windows PowerShell (version 5.1/7.1), you can check PowerShell’s version here
Get-Service LxssManager | Restart-Service
If you’re not using Windows PowerShell with Admin privilege, you may encounter following ERROR:
Restart the Lxssmanager service in Services
Or restart in Services with following steps:
- Fisrt press
🪟 + R
- Type
services.msc
and pressENTER
.
- Then find LXSSMANAGER, right click and select Restart.
Leave a Reply Cancel reply