If you prefer to terminate the Linux distro (Ubuntu, Kali, Debian, Mint, etc.) as soon as you are done using it or have to restart it, use a wsl.exe command-line tool to shut down one or all distributions manually. This guide will teach you the steps to shut down Linux distros running on the WSL2 platform on Windows 10 and 11.

Terminate a Linux distro on WSL Terminate all Linux distros on WSL

Terminate a Linux distro on WSL

To terminate a Linux distro on WSL running on Windows 11 or Windows 10, use these steps: Once you complete the steps, the distro running on the Windows Subsystem for Linux will gracefully shut down. You can always repeat the steps to terminate other distros or use the steps below to shut them all down.

In the command, replace DISTRO-NAME with the name of the distro you want to shut down, as shown in step 3. For example, wsl -t Ubuntu-20.04.

Terminate all Linux distros on WSL

To shut down all the WSL distros running on Windows 10 (or 11), use these steps: After you complete the steps, all the WSL distros will terminate immediately on Windows 11 or 10.

If you need to restart the Linux distro, spin it again from the Start menu, or use Command Prompt or PowerShell and run the wsl –distribution DISTRO-NAME command (replace the DISTRO-NAME with the actual name of the distro before running the command). All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.