EN
WSL - stop a specific distro (terminate, shutdown)
6
points
In this short article, we would like to show how to stop a specific distro on WSL.
Quick solution:
wsl --shutdown YOUR_DISTRO_NAME_HERE
Simple example
WSL Ubuntu termination example:
wsl --shutdown Ubuntu
Full example
In this section you can find example of stopping Ubuntu disto with checking the disto status before and after termination.
Simple steps:
- Open any command line, e.g. PowerShell
- View the list of distros and states (Ubuntu is Running):
PS C:\Users\john> wsl -l -v NAME STATE VERSION * docker-desktop Running 2 Ubuntu Running 2 wsl-vpnkit Running 2 docker-desktop-data Running 2
- Terminate Ubuntu disto:
PS C:\Users\john> wsl --shutdown Ubuntu
- View the list of distros and states, again (Ubuntu is Stopped):
PS C:\Users\john> wsl -l -v NAME STATE VERSION * docker-desktop Running 2 Ubuntu Stopped 2 wsl-vpnkit Running 2 docker-desktop-data Running 2