How to Start, Restart or Shutdown WSL2 on Windows 11

Published by Nyau Wai Hoe - Updated on

Microsoft’s Windows Subsystem for Linux version 2, better known as WSL2, lets developers run a Linux environment directly on Windows. You don’t need a traditional dual-boot or virtual machine setup. This means you can use Linux command-line tools right within your Windows 11 environment. In this guide, we’ll show you how to start, restart, or shut down WSL2 on your Windows 11 system.

Also see: How to Run CMD or PowerShell as SYSTEM in Windows 11

Start, Restart or Shutdown WSL2 on Windows 11

Starting WSL2

Before you can use WSL2, make sure it’s installed and enabled on your Windows 11 system. If it’s not yet installed, check out the Microsoft guide on how to do it.

Once WSL2 is set up, starting it is easy. Open the Command Prompt or PowerShell as an admin by right-clicking on the Start button and selecting either “Command Prompt (Admin)” or “PowerShell (Admin)”.

With your Command Prompt or PowerShell open, type in this command to get WSL2 started:

wsl

This opens up the default Linux distribution you’ve got installed. If you’ve got more than one and want to open a specific one, use the -d flag and the name of the distribution. For Ubuntu, it looks like this:

wsl -d Ubuntu

How to Start WSL2 in Windows 11

Restarting WSL2

Want to give WSL2 a quick restart? Here are some ways to restart it on Windows 11:

  1. First, shut down WSL2 (we’ll talk about that later) and then fire it up as you did before.Restarting WSL command
  2. Give the LxssManager service a quick reset. Hit Win + R, type services.msc, and press Enter.Open services.mscFind the LxssManager service, right-click it, and hit Restart.How to restart WSL2 on Windows 11
  3. Or, use PowerShell to restart the LxssManager service. Open PowerShell as an admin and run:
    Get-Service LxssManager | Restart-Service

Restart WSL2 Windows PowerShell

Shutting down WSL2

When you’re finished using the Linux environment, or if you need to restart it, you’ll need to shut down WSL2. Do this by opening Command Prompt or PowerShell as before, and typing:

wsl --shutdown

How to Shutdown WSL2 in Windows 11

Shutting down WSL2 completely turns off the Linux part of your system. It’s a smart move to shut it down when you’re not using it to help your computer run smoother.

Linked issue: This App is Preventing Shutdown or Restart

Precautions before shutting down

Please know that shutting down WSL2 is like turning off a real computer. Anything you haven’t saved in Linux will be lost. So, make sure you’ve saved all your work and closed any programs you don’t want to stop suddenly.

Some final notes

Using WSL2 on your Windows 11 system feels like having two operating systems without the need to switch between them. Being able to start, restart, or shut down WSL2 as needed gives you the flexibility to use a Linux environment whenever you need it and save system resources when you don’t.

Getting these processes right is key to navigating the combined Windows and Linux environment. Always make sure to save your work before shutting down, like you would when turning off your computer. For the most current information, additional details, and help, always check the official Microsoft documentation.


Nyau Wai Hoe
Nyau Wai Hoe is the Founder and Chief Editor of WindowsDigitals.com. With a degree in software engineering and over 12 years of experience in the tech support industry, Nyau has established himself as an expert in the field, with a primary focus on the Microsoft Windows operating system. As a tech enthusiast, he loves exploring new technologies and leveraging them to solve real-life problems.

Share via
Copy link