What Is WSL? Install WSL 2 and Ubuntu and Choose a Project Location
Understand WSL and Ubuntu, compare WSL 1 and 2, check your installation, and choose where to keep development files.
WSL lets you use a Linux distribution and command-line tools alongside Windows. You do not need to erase Windows or reboot into a different operating system. For a first development environment, start with WSL 2 and Ubuntu, then check the distribution's actual version and where your project files live.
AI-generated conceptual illustration of Windows and Linux workspaces
This guide is based on Microsoft's installation instructions and WSL version comparison, checked November 21, 2026. The commands below follow the documentation; they were not run on a Windows computer during this session.
What are WSL, Ubuntu, and the terminal?
WSL is the foundation connecting Windows with a Linux environment. Ubuntu is a Linux distribution installed on it, providing a shell, a package manager, and other tools. Windows Terminal is an app that opens command lines such as PowerShell and Ubuntu in tabs. These are different components, and Ubuntu is not the only distribution available.
WSL 2 runs a real Linux kernel in a lightweight virtual machine managed by Microsoft. Rather than saying it uses no virtual machine, it is more accurate to say that users generally do not need to configure and manage a conventional VM themselves. WSL 1 uses a different architecture and does not include a real Linux kernel. Microsoft's architecture comparison
Should you choose WSL 1 or WSL 2?
| Aspect | WSL 1 | WSL 2 |
| Architecture | Handles Linux system calls through Windows | Real Linux kernel in a managed VM |
| Linux system-call compatibility | Some limitations | Full system-call compatibility |
| Access to Windows files | Can be advantageous for cross-OS file access | Keep files used by Linux tools in the Linux file system |
| Typical starting point | Consider for specific compatibility or file-access needs | Default choice for a new installation |
Start by considering WSL 2 when tools depend on Linux file-system features or systemd. WSL 1 can be useful for a specialized workflow that repeatedly accesses Windows files from Linux tools. Which is faster depends on the workload and file location, so compare using your own work. Microsoft's comparison
Install and check the version
Microsoft's simplified install command requires Windows 11 or Windows 10 version 2004, build 19041 or later. Check virtualization support and your organization's management policies as well. Run this in an administrator PowerShell window:
The command installs the required components and the default Ubuntu distribution. Restart Windows when prompted, then create a Linux username and password on first launch. It is normal for password characters not to appear as you type. If WSL is already installed, the command may show help instead; list available distributions and specify the one you want.
If Store access or virtualization is restricted on a work PC, or installation fails, check your organization's policy and the alternatives in the official installation guide. Do not infer the version merely from a completed command. Check it:
Look for 2 in the VERSION column. If several distributions are installed, check each row. If you need to convert a WSL 1 distribution, back up important files first and use its exact name from the list.
Conversion can take time and requires the virtualization prerequisites for WSL 2. Changing the default for new distributions is separate from converting an existing one. Installation and version checks
Where should project files live?
If you run Git, build tools, and package managers in a Linux shell, keep the project under your Linux home directory. For example, in the Ubuntu shell:
The last command opens the current Linux folder in Windows File Explorer. Conversely, the Windows C drive is normally available at /mnt/c in WSL. As a starting rule, keep files on the Windows side when Windows apps primarily process them, and on the Linux side when Linux tools do. File location can affect I/O performance. Development setup and file-storage guidance
Windows and Linux have separate tools, environment variables, and packages. In a Linux shell, use which command-name to check which executable a command resolves to. On ARM64 Windows, also check architecture compatibility for both the Linux distribution and any binaries you install.
When you finish working
Closing WSL is different from deleting a distribution. wsl --unregister can permanently delete that distribution's data, so do not run it casually as a cleanup command. For shutdown scope and applying configuration changes, see
Restart WSL Safely: shutdown vs terminate and Configuration Changes.