WSL or Windows Subsystem for Linux is a built-in feature of Windows 10/11 that allows users to run a Linux environment on Windows systems without the need to dual-boot or use a virtual machine. Restarting WSL is a convenient and efficient way to reboot or reinitialize a Linux instance without restarting the entire system. This article will focus on how to restart WSL through Windows PowerShell, Command Prompt (CMD) and Task Manager.
You can use any of the following methods to restart WSL on Windows.
Please make sure to save your work on whatever distribution you are using because when you restart the WSL service it will shut down.
To restart WSL from Windows PowerShell, we use the WSL command with appropriate options. It is a Windows executable command that interacts with the WSL distribution.
WSL-关闭
WSL-Shutdown will terminate all active WSL distributions or instances currently running on the physical system or device. Multiple WSL distributions can be installed on the computer, such as Ubuntu, Debian, Kali, etc., and all of these distributions can be shut down and restarted simultaneously through the above steps.
The above is the detailed content of How to restart WSL using PowerShell, CMD, Task Manager. For more information, please follow other related articles on the PHP Chinese website!