To restart WSL, open PowerShell or Command Prompt as Administrator and run wsl --shutdown. This stops all running WSL distributions and the lightweight utility VM that hosts them. The next time you open a WSL terminal or run a WSL command, the VM and your default distribution start fresh. This clears stuck processes, resets network and memory state, and applies changes to .wslconfig. No data in your Linux filesystem is lost, but unsaved work in running processes will be terminated.
What You'll Need
- A Windows 10 (version 2004 or later) or Windows 11 PC with WSL installed.
- Access to PowerShell or Command Prompt. Administrator rights are recommended for
wsl --shutdownand required for some troubleshooting steps. - Knowledge of your WSL distribution name (e.g., Ubuntu) if you want to restart a single distribution. Run
wsl --list --verboseto see names. - Backup of any unsaved work in Linux applications, as restarting terminates running processes.
Step-by-Step
- Open PowerShell or Command Prompt as Administrator. Press Win + X and choose “Windows PowerShell (Admin)” or “Terminal (Admin)”. Administrator rights ensure the shutdown command can stop all WSL processes.
- List your WSL distributions (optional). Run
wsl --list --verboseto see the names and states of your distributions. This helps if you plan to restart a specific one. - Shut down all WSL instances. Run
wsl --shutdown. This stops all distributions and the WSL 2 lightweight VM. There is no confirmation prompt; the command returns immediately. - Verify that WSL has stopped. Run
wsl --list --running. It should output “There are no running distributions.” If distributions still appear, wait a few seconds and run the command again. - Restart WSL by launching a distribution. Open your Linux distribution from the Start menu, or run
wslin PowerShell. This starts the WSL VM and your default distribution. Alternatively, runwsl -d <DistroName>to start a specific distribution. - Restart a single distribution (optional). If you only want to restart one distribution without stopping others, run
wsl --terminate <DistroName>. Then start it again withwsl -d <DistroName>. Note that terminating a distribution does not stop the WSL 2 VM if other distributions are running. - Confirm the restart worked. In your Linux terminal, run
ps auxortopto check that only expected processes are running. You can also check the uptime withuptime; it should show a short time since the restart.
Common Mistakes
- Running
wsl --shutdownwithout saving work. The command forcefully terminates all Linux processes. Save files and close applications first. - Confusing
wsl --shutdownwithwsl --terminate.--shutdownstops the entire WSL subsystem, while--terminatestops only the specified distribution. Using the wrong one may leave other distributions running or stop more than intended. - Expecting the command to restart automatically.
wsl --shutdownonly stops WSL. You must start a distribution again to restart it. - Not using an elevated prompt. Without administrator rights,
wsl --shutdownmay fail silently or return an error. Always open PowerShell as Administrator. - Assuming data loss. Restarting WSL does not delete files in your Linux home directory or installed packages. Only unsaved in-memory data is lost.
Tips
- Create a desktop shortcut or alias for
wsl --shutdownto restart quickly. - After editing
.wslconfig(located atC:\Users\<YourName>\.wslconfig), runwsl --shutdownto apply changes such as memory limits or kernel settings. - If WSL seems slow or unresponsive, a restart often resolves temporary issues without rebooting Windows.
- Use
wsl --list --verboseto check the WSL version (1 or 2) of each distribution. Restarting behavior is the same, but WSL 2 uses a VM that is fully stopped by--shutdown. - To restart WSL from inside a Linux terminal, you can run
wsl.exe --shutdownif the Windows host path is available, but it is usually easier to use a Windows terminal.
Troubleshooting
wsl --shutdownreturns “The operation could not be started” or similar. Ensure you are running PowerShell as Administrator. If the error persists, restart the LxssManager service: open Services (services.msc), find “LxssManager”, and restart it. Then trywsl --shutdownagain.- WSL distributions still show as running after shutdown. Wait a few seconds and run
wsl --list --runningagain. If they persist, terminate each distribution individually withwsl --terminate <DistroName>, then runwsl --shutdown. - WSL fails to start after shutdown. Run
wsl --statusto check for errors. If the WSL kernel needs updating, runwsl --update. If the issue continues, trywsl --shutdownagain, then restart your computer. - “No installed distributions” error when starting. Run
wsl --list --verboseto see if your distribution is listed. If not, it may need to be reinstalled. If it is listed but not starting, trywsl --terminate <DistroName>thenwsl -d <DistroName>. - Network or DNS issues after restart. Restarting WSL often fixes these. If problems persist, run
wsl --shutdownagain, then check your Windows network settings. In some cases, resetting the WSL network stack withwsl --shutdownand restarting is enough.
Frequently Asked Questions
Does restarting WSL delete my files?
No. Restarting WSL stops running processes but does not delete files in your Linux filesystem. Only unsaved changes in memory are lost.
What is the difference between wsl --shutdown and wsl --terminate?
wsl --shutdown stops all WSL distributions and the WSL 2 virtual machine. wsl --terminate <DistroName> stops only the specified distribution and leaves others running.
Do I need to restart my computer to restart WSL?
No. Running wsl --shutdown and then starting a distribution is sufficient. A full reboot is only needed if WSL is unresponsive or after certain system updates.
How do I restart WSL from inside a Linux terminal?
You can run wsl.exe --shutdown from within WSL if the Windows host path is available, but it is more reliable to use a Windows PowerShell or Command Prompt window.
Will restarting WSL apply changes to .wslconfig?
Yes. Changes to .wslconfig take effect after you run wsl --shutdown and start WSL again.
Can I restart WSL without administrator rights?
wsl --shutdown typically requires administrator privileges. Without them, the command may fail. Use an elevated prompt.