How to Shut Down Ubuntu on Windows 11 Using WSL
This guide explains how to fully turn off a Linux system running on your Windows 11 computer using wsl/" class="sal-link" rel="noopener" target="_blank" data-sal-id="2452">Windows Subsystem for Linux (WSL).
Why turn off your Linux system?
Windows Subsystem for Linux (WSL) lets you run Linux tools right inside Windows. When you close the terminal window, the Linux system often keeps running in the background. This uses up your computer’s memory and processor power even when you aren’t using it.
What happens when you are done?
By shutting down these background services, you free up system resources. This makes your computer run faster and saves battery life.
How to shut down Linux on Windows 11
You can stop a specific Linux system or shut down everything at once using the wsl.exe command.
Step 1: Check what is running
First, open the Command Prompt or Windows PowerShell app as an Administrator (required for full system control). Type the following command and press Enter:
This shows you a list of all Linux systems currently active on your computer.
Step 2: Terminate a specific system
If you only want to stop one specific Linux distribution, use the following command:
wsl -t Linux-machine-nameReplace “Linux-machine-name” with the name you saw in the list from Step 1. For example, if your system is named Ubuntu-20.04, you would type:
wsl -t Ubuntu-20.04Step 3: Shut down all systems
If you want to stop every Linux service running in the background at once, run this command:
wsl --shutdownThis command does not require special administrative rights in most cases, though running it as an Administrator ensures all services are closed properly.
Summary
Running Linux on Windows 11 is powerful, but it can drain your computer’s resources if left running in the background. You can easily manage these services by using the wsl --list --verbose command to see what is active, the wsl -t command to stop a specific system, or the wsl --shutdown command to turn off all Linux environments completely. Using these commands ensures your computer stays fast and efficient.
How do I shut down Ubuntu on Windows 11 using WSL?
What command do I use to list all running WSL distributions?
Can I terminate all running Linux distributions at once in WSL?
What happens to my Linux environment when I exit the terminal in WSL?
Is it necessary to shut down WSL distributions when I'm done using them?
Was this guide helpful?
Leave a Reply Cancel reply