When a Windows Subsystem for Linux environment has already been created from PowerShell, it usually does not need to be installed again. In most cases, the distribution is still registered with Windows and can be reopened with the correct wsl command, from PowerShell, Command Prompt, Windows Terminal, or the Start menu. The key is to confirm that the distribution still exists, identify its exact name, and launch it directly instead of repeating the installation process.
TLDR: Open PowerShell and run wsl -l -v to list your existing WSL distributions. If your distribution appears in the list, reopen it with wsl -d DistributionName, replacing the name with the exact one shown. If it does not appear, check whether it was previously exported, imported, moved, or unregistered before attempting recovery. Reinstalling should be a last resort, not the first step.
Understanding What “Previously Created in PowerShell” Means
Many users create WSL from PowerShell using a command such as wsl --install, wsl --install -d Ubuntu, or wsl --import. After that first setup, the Linux system becomes a registered WSL distribution on Windows. It is stored separately from PowerShell itself, which means closing the PowerShell window does not delete or reset the Linux environment.
This distinction is important. PowerShell is only the tool used to create or launch WSL. Your Linux distribution, files, packages, users, and configuration are maintained by WSL and Windows. Unless the distribution has been explicitly unregistered, removed, or corrupted, it should remain available.
Reopening WSL therefore means starting the existing distribution again, not creating a new one. Running installation commands repeatedly can cause confusion, install duplicate distributions, or make it look as though your original environment has disappeared.
Step 1: Open PowerShell Normally
To begin, open PowerShell from the Start menu. In most cases, regular PowerShell is sufficient. You do not usually need to run it as Administrator just to open an existing WSL distribution.
You can use either Windows PowerShell or PowerShell 7. You may also use Command Prompt or Windows Terminal, because the wsl command is available from standard Windows shells. However, since the environment was originally created in PowerShell, it is reasonable to start there.
Once PowerShell is open, do not run the install command yet. First, inspect what WSL already knows about your system.
Step 2: List Existing WSL Distributions
Run the following command:
wsl -l -v
This command lists registered WSL distributions and shows their current state and WSL version. You may see output similar to this:
NAME STATE VERSION
* Ubuntu Stopped 2
Debian Running 2
The NAME column is the most important part. It shows the exact distribution name you must use when reopening WSL. The STATE column tells you whether the distribution is currently running or stopped. A stopped distribution is not a problem. WSL distributions often stop automatically when they are not being used.
The asterisk identifies the default distribution. If you simply run wsl without specifying a distribution, Windows will open the default one.
Step 3: Reopen the Default WSL Distribution
If the distribution you want is the default distribution, reopening it is very simple. In PowerShell, run:
wsl
This command starts the default WSL distribution and places you inside the Linux shell. For example, if Ubuntu is your default distribution, running wsl will open Ubuntu and display a Linux prompt.
If the distribution was stopped, WSL will start it automatically. You do not need to manually start a service or reinstall packages. Your Linux home directory, installed software, shell configuration, and system files should still be present.
Step 4: Reopen a Specific WSL Distribution
If you have more than one distribution installed, or if the one you need is not the default, use the -d option:
wsl -d Ubuntu
Replace Ubuntu with the exact name displayed by wsl -l -v. For example:
wsl -d Debian
wsl -d kali-linux
wsl -d Ubuntu-22.04
Distribution names are not always identical to the visible name in the Start menu. For that reason, always rely on the output of wsl -l -v when typing the command.
If the name includes spaces, place it in quotation marks:
wsl -d "My Linux Environment"
This approach is the safest and most direct way to reopen a previously created WSL instance from PowerShell.
Step 5: Set the Distribution as Default if Needed
If you want a particular distribution to open whenever you run wsl, set it as the default distribution:
wsl --set-default Ubuntu
After that, running the shorter command below will reopen that distribution:
wsl
This is useful when Windows has selected a different Linux distribution as the default, or when you imported a custom WSL environment and want it to behave like your primary Linux system.
Step 6: Open WSL from Windows Terminal
Windows Terminal provides a convenient way to reopen WSL without typing the command each time. If your distribution is properly registered, Windows Terminal often detects it automatically and creates a profile for it.
To check this, open Windows Terminal, click the drop-down arrow near the tab bar, and look for your Linux distribution. If it appears, select it. Windows Terminal will open a new tab directly inside that WSL environment.
If the profile is missing, you can still open PowerShell inside Windows Terminal and run:
wsl -d DistributionName
For frequent use, you may create or edit a Windows Terminal profile that launches WSL directly. The command line for such a profile commonly looks like this:
wsl.exe -d Ubuntu
This does not reinstall anything. It simply tells Windows Terminal to start the existing registered distribution.
Step 7: Open WSL from the Start Menu
Many distributions installed from the Microsoft Store also have Start menu entries. Search for Ubuntu, Debian, or the name of the distribution you installed. Selecting it should reopen the Linux environment.
This method works well for Store-installed distributions. However, distributions created with wsl --import do not always have traditional Start menu shortcuts. Imported distributions are fully usable, but they are usually opened from the command line with wsl -d.
If Your Distribution Does Not Appear in the List
If wsl -l -v does not show the distribution, Windows does not currently consider it registered. This does not automatically mean the files are gone, but it does mean WSL cannot launch it by name.
There are several possible explanations:
- The distribution was unregistered using
wsl --unregister. This normally deletes the WSL distribution’s virtual disk and should be treated as destructive. - The distribution was exported to a
.tarfile and later removed. In that case, it must be imported again from the export file. - The distribution was imported into a custom folder, and that folder was moved, deleted, or is no longer accessible.
- You are using a different Windows user account. WSL distributions are normally registered per Windows user.
- WSL itself is not functioning properly due to a Windows feature, update, or virtualization issue.
If you previously exported the distribution, you can restore it with a command similar to this:
wsl --import UbuntuRestored C:\WSL\UbuntuRestored C:\Backups\ubuntu.tar --version 2
This is technically an import operation, not a reinstall from the Store. It recreates the WSL registration from your saved Linux filesystem archive.
If the Distribution Starts but Opens as Root
Sometimes a reopened distribution starts successfully but logs in as root instead of your normal Linux user. This can happen with imported distributions or certain configuration changes.
First, confirm your Linux users by opening the distribution and running:
ls /home
If your username appears there, you can set the default user depending on the distribution. For Ubuntu installed from the Store, the command often looks like this from PowerShell:
ubuntu config --default-user yourusername
For newer distribution launchers, the executable name may differ, such as ubuntu2204 or debian. Imported distributions may require editing /etc/wsl.conf inside Linux:
[user]
default=yourusername
After editing that file, shut down WSL and reopen it:
wsl --shutdown
wsl -d DistributionName
If WSL Opens but Your Files Seem Missing
If WSL opens but your expected files are not visible, first check whether you opened the correct distribution. Run this inside WSL:
cat /etc/os-release
pwd
ls /home
Then exit and check the Windows-side distribution list again:
wsl -l -v
It is common for users to accidentally create a second distribution by reinstalling or selecting a different version, such as Ubuntu instead of Ubuntu-22.04. Your files may still be in the original distribution.
Your Linux home folder is usually located inside the WSL virtual disk, not directly in a normal Windows folder. You can access the running distribution from File Explorer using:
\\wsl$
or, on newer systems:
\\wsl.localhost
From there, choose the correct distribution and inspect its filesystem carefully.
Image not found in postmetaUseful Commands for Managing Existing WSL Instances
The following commands are useful when reopening or troubleshooting an existing WSL distribution:
wsl -l -v— list registered distributions, state, and WSL version.wsl— open the default distribution.wsl -d Name— open a specific distribution.wsl --set-default Name— make a distribution the default.wsl --shutdown— stop all running WSL distributions and the WSL virtual machine.wsl --terminate Name— stop a specific distribution.wsl --status— show general WSL status and default version information.wsl --update— update WSL components on supported Windows versions.
Use these commands deliberately. In particular, be careful with wsl --unregister. That command removes a distribution from WSL and can delete its data. It should not be used as a routine troubleshooting step unless you have a verified backup and understand the consequences.
When Reinstallation Is Actually Necessary
Reinstallation is rarely required just because you closed PowerShell, restarted Windows, or have not used WSL for a while. If wsl -l -v shows the distribution, you should be able to reopen it directly.
Reinstallation may be necessary only if the distribution was deliberately removed, the virtual disk was deleted, or the operating system files are badly corrupted and no usable export or backup exists. Even then, it is wise to look for backups, exported .tar files, project copies, Git repositories, or mounted Windows folders before starting over.
If the distribution contains important work, consider exporting it before making major changes:
wsl --export Ubuntu C:\Backups\ubuntu-backup.tar
This creates a backup that can later be imported if needed. A disciplined export habit is one of the best ways to avoid data loss when working with WSL.
Final Recommendations
To reopen a WSL environment previously created in PowerShell, start with inspection, not installation. Run wsl -l -v, identify the distribution name, and launch it with wsl or wsl -d Name. If necessary, set it as the default distribution for easier access in the future.
Most WSL environments remain intact across terminal closures, Windows restarts, and normal updates. Treat PowerShell as the doorway, not the storage location. As long as the distribution is still registered and its files are present, reopening it is a straightforward process that should not require reinstalling Linux or losing your existing work.