Amazon Cyber Monday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

Does WSL Install a Linux Distro or Only Commands?

WSL does more than provide Linux commands: it runs a Linux distribution, such as Ubuntu, on Windows. You can install a distribution through WSL, but the command you use and what happens depend on whether you are installing WSL itself, choosing a distribution, or launching one already installed.

What WSL and a Linux distribution mean

Windows Subsystem for Linux (WSL) is a Windows feature that lets you run a Linux environment on Windows. A Linux distribution, or distro, is the user-space operating system environment you work in. It typically includes a package manager, command-line tools, system libraries, and a shell such as Bash.

Ubuntu, Debian, and openSUSE are examples of distributions available for WSL. WSL is not itself a distro, and a shell such as Bash is not a complete distro. Installing a distro gives you an environment in which Linux commands and applications can run; WSL provides the integration that makes that environment work on Windows.

What the wsl install command actually does

On supported, up-to-date Windows 10 and Windows 11 systems, the standard setup command is:

wsl --install

This command enables the required Windows components, installs the WSL components, and installs Ubuntu by default in the usual setup. In other words, it ordinarily sets up both WSL and a Linux distribution—not just a command-line program. Windows may ask you to restart before setup is complete. The exact experience can vary with Windows version, existing WSL configuration, and available updates.

To choose a different distribution, list the options WSL makes available:

wsl --list --online

Then install one by its displayed name, for example:

wsl --install -d Debian

Use the distribution name exactly as shown in the online list. If you already have WSL or a distro installed, running the command may behave differently from a first-time setup; it does not necessarily create a fresh copy each time.

What happens after installation

When you start a newly installed distribution from the Start menu or by running wsl in Windows Terminal or another supported terminal, its first launch completes initialization. You will generally be asked to create a Linux username and password. This account is separate from your Windows account. When entering the Linux password, the terminal may show no characters or asterisks; that is normal.

After setup, you can use the distro’s shell to run commands, install Linux packages, and work with files. For example, Ubuntu users commonly use sudo apt update to refresh package information and sudo apt install followed by a package name to install software. Package commands differ by distro: Debian and Ubuntu use APT, while other distributions may use different package managers.

WSL 2, the default for many current installations, runs a real Linux kernel in a lightweight virtual machine. WSL 1 uses a different compatibility architecture. Both let you use a Linux environment from Windows, but they differ in how Linux system calls and filesystems are handled. You can check installed distributions and their WSL versions with:

wsl --list --verbose

Where the Linux files and Windows files are

Each installed distro has its own Linux filesystem and user accounts. In a WSL shell, Windows drives are commonly available under /mnt, so a Windows folder such as C:\Users\Sam\Projects may be reached at /mnt/c/Users/Sam/Projects. The exact Windows username and folder path will differ.

Linux files can also be accessed from Windows through the WSL network location, commonly shown in File Explorer as \\wsl$ or \\wsl.localhost, depending on the setup. For good performance, Microsoft generally recommends keeping files in the filesystem best suited to the tools you are using: Linux project files in the distro’s filesystem for Linux-heavy work, and Windows files on the Windows filesystem for Windows applications. Avoid manually editing WSL’s internal virtual disk files through hidden system folders; use the supported WSL paths instead.

Choosing, checking, and removing a distro

Ubuntu is a practical starting point for many beginners because it is widely documented and commonly used for development. If you need a particular environment, choose a distro based on its package ecosystem, support needs, and the instructions for the software you plan to run. A distro installed in WSL is not the same thing as replacing Windows or setting up a traditional dual-boot system.

  • See available choices with wsl --list --online.
  • See installed distros and their state with wsl --list --verbose.
  • Start a particular distro with wsl -d Ubuntu, substituting its installed name.
  • Set the default distro with wsl --set-default Ubuntu, if more than one is installed.

Be careful with removal: wsl --unregister Ubuntu deletes that distribution’s WSL filesystem and its stored data. It is not merely a shortcut removal or a way to stop the distro. Back up files you want to keep before unregistering it. You can stop running WSL instances with wsl --shutdown; that does not delete the installed distro.

Common installation problems and alternatives

If wsl --install is not recognized or does not work, first check your Windows version and install available Windows updates. Older Windows releases may require enabling WSL and its virtualization-related components through other steps, while some managed work or school computers restrict virtualization or optional Windows features. Administrator permissions or a restart may also be required. Microsoft’s current WSL installation documentation is the best guide for version-specific procedures.

If installation succeeds but a distro does not appear, check wsl --list --verbose and the Microsoft Store’s installed apps. If it is listed but will not start, restart Windows and update WSL with wsl --update where supported. Error messages can point to different causes, so avoid deleting or unregistering a distro as a first troubleshooting step, especially if it contains files you have not backed up.

WSL is distinct from a full Linux virtual machine and from dual boot. It is integrated with Windows and is convenient for command-line development, scripting, and many Linux tools. A traditional virtual machine gives you a more separately managed guest operating system, while dual boot runs Windows or Linux directly after you choose an operating system at startup. If you only need a few Linux-like utilities, Windows tools such as PowerShell or Git for Windows may suffice, but they do not install a Linux distro.

Frequently Asked Questions

Does wsl --install install Ubuntu automatically?
On the standard current setup, yes: Ubuntu is the default distro installed by wsl --install. You can choose another listed option with wsl --install -d and its distro name.

Can I use WSL without installing a Linux distro?
WSL is the Windows feature, but you need a distro to get a usable Linux user environment and shell. The standard installation command normally installs a distro as part of setup.

Is WSL the same as Ubuntu?
No. WSL is the Windows subsystem for running Linux environments; Ubuntu is one distribution that can run under it. You can install other supported distributions as well.

Does installing WSL replace Windows?
No. WSL runs alongside Windows. It does not replace Windows, format your computer, or make Linux the operating system that starts when the computer boots.

Will uninstalling a distro delete my files?
Unregistering a distro deletes its stored Linux filesystem, including files in that environment. Back up anything important before using wsl --unregister.

Does WSL Install a Linux Distro or Only Commands?
Scroll to top