How to Reopen a Previously Created WSL Distribution in PowerShell

By

Windows Subsystem for Linux, commonly called WSL, allows a Windows user to run Linux distributions directly inside Windows without managing a traditional virtual machine. After a distribution such as Ubuntu, Debian, Kali, or openSUSE has already been installed, it can be reopened at any time from PowerShell. This is useful when a user wants to return to a previous Linux environment, continue development work, repair a package, access files, or run Linux commands from a familiar Windows terminal.

TLDR: To reopen a previously created WSL distribution in PowerShell, the user should open PowerShell and run wsl -l -v to list available distributions. They can then start the desired one with wsl -d DistributionName, replacing the name with the exact distribution name shown in the list. If the distribution is the default, simply running wsl will reopen it. If problems occur, checking the WSL status, distribution state, and default version usually resolves most startup issues.

Understanding What “Reopen” Means in WSL

When a WSL distribution is created, Windows stores its Linux filesystem, configuration, packages, users, and settings. Reopening it does not create a new distribution. Instead, PowerShell launches the existing Linux environment and resumes access to its files, shell, and installed tools.

A distribution may be in a Stopped state when it is not actively running. This is normal. WSL distributions do not need to remain open continuously. When the user launches one again, WSL starts the environment in the background and opens a Linux shell. This makes reopening a distribution quick and efficient.

PowerShell is often preferred because it gives the user access to both Windows commands and WSL commands in one place. It can list installed distributions, select a specific one, launch commands inside Linux, and manage WSL versions.

Step 1: Open PowerShell

The user first needs to open PowerShell. This can be done from the Start menu by searching for “PowerShell” and selecting Windows PowerShell or PowerShell. On modern Windows systems, the user may also use Windows Terminal, which can open PowerShell tabs and WSL tabs in the same interface.

Administrator rights are usually not required to reopen an existing WSL distribution. A regular PowerShell session is enough for most tasks, including listing distributions and launching one. However, administrative permissions may be necessary for system-level repairs, Windows feature changes, or certain network-related configurations.

Step 2: List Existing WSL Distributions

Before reopening a specific distribution, the user should confirm its exact name. PowerShell can display all installed WSL distributions with the following command:

wsl -l -v

This command lists each distribution, its running state, and the WSL version it uses. The output may look similar to this:

  NAME            STATE           VERSION
* Ubuntu          Stopped         2
  Debian          Stopped         2
  kali-linux      Running         2

The asterisk marks the default distribution. If the user runs wsl without specifying a distribution, WSL starts the default one. The STATE column shows whether the distribution is currently Running or Stopped. The VERSION column usually shows either WSL 1 or WSL 2.

The exact distribution name matters. For example, Ubuntu, Ubuntu-22.04, and kali-linux are different names. The user should copy or type the name exactly as PowerShell displays it.

Step 3: Reopen the Default WSL Distribution

If the previously created distribution is already the default, reopening it is very simple. The user can run:

wsl

This launches the default Linux distribution and opens the default Linux shell. In many cases, the user will see a prompt similar to:

username@computername:~$

At this point, the Linux environment is open and ready. The user can run Linux commands, navigate directories, install packages, edit files, start development servers, and continue previous work.

If the default distribution is not the one the user wants, they should either specify the distribution name when launching it or change the default distribution permanently.

Step 4: Reopen a Specific Distribution

To reopen a particular WSL distribution from PowerShell, the user should run:

wsl -d DistributionName

For example, to open Ubuntu, the command may be:

wsl -d Ubuntu

To open Debian, it may be:

wsl -d Debian

If the distribution name contains a version number, the command must include it:

wsl -d Ubuntu-22.04

The -d option means distribution. It tells WSL which installed Linux environment should be opened. This is the most reliable method when multiple distributions are installed.

Opening a Distribution as a Specific Linux User

A WSL distribution may contain multiple Linux users. If the user wants to reopen the distribution as a specific Linux account, PowerShell can include the -u option:

wsl -d Ubuntu -u username

This is helpful when the default Linux user has changed, when administrative work must be performed as root, or when a separate development account exists inside the distribution. For example:

wsl -d Ubuntu -u root

Opening as root should be done carefully because root has full permission inside the Linux environment. For routine development, the normal Linux user account is usually safer.

Running a Linux Command Without Fully Entering the Shell

PowerShell can also start a WSL distribution, run one Linux command, and then return to PowerShell. This is useful for quick checks, scripts, and automation tasks. The syntax is:

wsl -d DistributionName command

For example, the following command reopens Ubuntu long enough to print the current Linux directory:

wsl -d Ubuntu pwd

Another example updates package information inside Ubuntu:

wsl -d Ubuntu sudo apt update

The distribution starts automatically if it is stopped. After the command finishes, it may remain running for a short time or stop later depending on WSL behavior and background processes.

Changing the Default Distribution

If the user regularly reopens the same distribution, setting it as the default can save time. First, the user should list distributions:

wsl -l -v

Then they can set the preferred distribution as default:

wsl --set-default Ubuntu

After this, running wsl from PowerShell will open Ubuntu automatically. The default distribution is especially important when a user has several Linux environments installed for different projects.

Checking WSL Status and Version

If a distribution does not reopen as expected, the user can check the general WSL configuration with:

wsl --status

This command displays information about the default WSL version, kernel version, and other configuration details. It may also show whether updates are needed. For WSL 2 distributions, keeping the WSL kernel updated is important for stability and compatibility.

The user can update WSL with:

wsl --update

After updating, it may be helpful to shut down WSL completely and then reopen the distribution:

wsl --shutdown

Then the user can launch the distribution again:

wsl -d Ubuntu

Restarting a Stuck or Unresponsive Distribution

Sometimes a distribution may appear to hang, fail to open, or behave strangely because of a background process. In such cases, the user can terminate only that distribution:

wsl --terminate Ubuntu

After termination, it can be reopened normally:

wsl -d Ubuntu

If multiple distributions or the WSL virtual machine itself need to be stopped, the user can run:

wsl --shutdown

This stops all running WSL distributions and the lightweight WSL 2 virtual machine. It does not delete any distributions or files. The next time a distribution is launched, WSL starts again automatically.

Accessing WSL Files After Reopening

Once a distribution is reopened, the user is usually placed in the Linux home directory. Linux files are stored inside the WSL distribution, while Windows drives are mounted under /mnt. For example, the Windows C drive is commonly available at:

/mnt/c

From inside WSL, the user can access Windows files with commands such as:

cd /mnt/c/Users

From PowerShell, the user can open the Linux filesystem in File Explorer by running:

explorer.exe \\wsl$\Ubuntu

This opens the selected distribution’s files through Windows Explorer. The user should avoid manually editing WSL internal files from hidden Windows system folders. Using \\wsl$ is the safer supported method.

Common Reasons a Distribution Does Not Reopen

A previously created WSL distribution may fail to open for several reasons. The distribution name may have been typed incorrectly, the distribution may have been unregistered, WSL may need an update, or Windows virtualization support may be disabled. The user should first confirm that the distribution still exists with:

wsl -l -v

If it does not appear in the list, it may have been removed. If it does appear but will not start, the user can try wsl --shutdown, restart Windows, and update WSL.

For WSL 2, virtualization must be enabled in BIOS or UEFI, and the required Windows features must be installed. Most modern installations handle this automatically, but older systems may need additional configuration.

Best Practices for Reopening WSL in PowerShell

  • Use wsl -l -v first when unsure of the exact distribution name.
  • Set a default distribution if one Linux environment is used most often.
  • Use wsl --shutdown when WSL behaves unexpectedly.
  • Keep WSL updated with wsl --update.
  • Avoid editing Linux files from unsupported Windows paths; use \\wsl$ or work inside the Linux shell.
  • Use separate distributions for different projects when isolation is helpful.

Conclusion

Reopening a previously created WSL distribution in PowerShell is a straightforward task once the user understands the basic commands. The most important command is wsl -l -v, which identifies installed distributions and their states. From there, wsl opens the default distribution, while wsl -d DistributionName opens a specific one.

PowerShell also allows the user to run one-off Linux commands, select a Linux user, change the default distribution, update WSL, and restart stuck environments. With these commands, a WSL distribution becomes easy to manage and reopen whenever the user needs access to Linux tools on Windows.

FAQ

How does a user reopen the default WSL distribution in PowerShell?

The user can open PowerShell and run wsl. This starts the default WSL distribution and opens its Linux shell.

How can a specific WSL distribution be reopened?

The user should run wsl -d DistributionName, replacing DistributionName with the exact name shown by wsl -l -v.

How can the user see all installed WSL distributions?

The command wsl -l -v lists all installed distributions, their current state, and whether they use WSL 1 or WSL 2.

Does reopening a WSL distribution delete or reset anything?

No. Reopening a distribution only starts the existing Linux environment. It does not delete files, reset packages, or create a new installation.

What should be done if a WSL distribution will not open?

The user should confirm the name with wsl -l -v, run wsl --shutdown, try reopening it, and update WSL with wsl --update. Restarting Windows may also help.

Can a WSL distribution be opened as root?

Yes. The user can run wsl -d DistributionName -u root. Root access should be used carefully because it has full administrative control inside the Linux environment.

How can the default WSL distribution be changed?

The user can run wsl --set-default DistributionName. After that, the command wsl will open that distribution by default.

Can PowerShell run a Linux command without entering the WSL shell?

Yes. The user can run a command such as wsl -d Ubuntu ls. WSL starts the distribution, runs the command, and returns the result in PowerShell.