Windows Subsystem for Linux (WSL) lets you run a Linux environment directly inside Windows 11 without setting up a traditional dual-boot system or a full virtual machine. It is useful for developers, system administrators, students, and anyone who needs Linux commands or tools while continuing to use Windows.
Windows 11 includes built-in support for WSL, and the installation process is much simpler than it used to be. Once WSL is enabled, you can install a Linux distribution such as Ubuntu and access it through Windows Terminal.
Method 1: Install WSL Using Windows Terminal
The easiest way to install WSL on Windows 11 is through Windows Terminal or PowerShell.
- Right-click the Start button.
- Select Terminal (Admin).
- If Windows asks for permission, select Yes.
- Enter the following command:
wsl --install
- Press Enter.
- Windows will enable the required WSL components.
- The default Linux distribution will be downloaded and installed.
- Restart your computer when Windows asks you to do so.
After restarting, Windows may automatically open the Linux distribution and complete its setup.
You will normally be asked to create a Linux username and password. These credentials are separate from your Windows account.
If the command does not work, make sure Windows Terminal is running with administrator privileges.
Method 2: Install a Specific Linux Distribution
The basic wsl --install command normally installs the default supported Linux distribution. You can also choose a particular distribution.
First, open Terminal (Admin) and run:
wsl --list --online
Windows will display the Linux distributions available for installation.
For example, you may see distributions such as Ubuntu and other Linux variants.
To install Ubuntu, use:
wsl --install -d Ubuntu
Replace Ubuntu with the exact distribution name shown by the previous command if you want another option.
After installation, restart Windows if required. When the distribution starts for the first time, it will prepare the Linux filesystem and ask you to create your Linux user account.
Method 3: Open and Set Up Linux in WSL
After installing WSL, you can launch your Linux distribution from the Start menu.
- Open Start.
- Search for your installed Linux distribution.
- Select it from the results.
- Wait while the initial setup completes.
- Enter a Linux username.
- Enter a password.
- Confirm the password.
When the setup finishes, you will see a Linux command prompt.
You can now run Linux commands such as:
pwd
ls
mkdir test
cd test
The Linux environment works alongside your normal Windows applications. You can close the Linux terminal whenever you want and reopen it later.
Your Linux username does not have to match your Windows username.
Method 4: Check Your WSL Version
Windows 11 supports different versions of WSL, with WSL 2 being the preferred version for most modern installations.
To check the installed version, open PowerShell or Windows Terminal and run:
wsl --list --verbose
You should see your installed Linux distribution along with its WSL version.
For example:
NAME STATE VERSION
Ubuntu Running 2
If your distribution is using WSL 2, you can continue using it normally.
If it is using WSL 1 and you want to move it to WSL 2, first make sure the necessary Windows virtualization features are available. You can then convert the distribution with:
wsl --set-version Ubuntu 2
Replace Ubuntu with the name of your installed distribution.
You can also make WSL 2 the default version for distributions installed in the future:
wsl --set-default-version 2
Method 5: Access Windows Files From Linux
One of the useful features of WSL is that your Windows files can be accessed directly from Linux.
Windows drives are generally available under the /mnt directory.
For example, to access the Windows C drive:
cd /mnt/c
You can then view its contents:
ls
Your Windows user folder can usually be accessed through a path similar to:
cd /mnt/c/Users/YourName
Replace YourName with your Windows account folder name.
This makes it possible to work with Windows files using Linux commands without copying them into a separate virtual machine.
For example, you can create a folder in Windows and access it from WSL, or use Linux tools to work with files stored on your Windows drive.
Be careful when modifying important Windows system files from WSL. Only change files when you understand their purpose.
Method 6: Run Windows Commands From WSL
WSL is designed to work closely with Windows, so you can also launch Windows programs and commands from the Linux environment.
For example, the following command opens File Explorer in the current Linux directory:
explorer.exe .
You can also use Windows commands by adding .exe when appropriate.
For example:
notepad.exe
This allows you to open Windows applications while working in your Linux terminal.
The integration is particularly useful for development workflows where you may use Linux command-line tools together with Windows applications.
You can also move between Windows and Linux environments without restarting the computer.
Method 7: Update WSL and Manage Your Installation
WSL includes commands for managing distributions and updating the WSL environment.
To update WSL, open Windows Terminal as administrator and run:
wsl --update
To check the current WSL status, use:
wsl --status
To see installed distributions:
wsl --list
To shut down all running WSL instances:
wsl --shutdown
The shutdown command can be useful if WSL is consuming resources or if you need to restart the WSL environment without restarting Windows.
You can also start a particular distribution by running:
wsl -d Ubuntu
Replace Ubuntu with your installed distribution.
If you have several distributions installed, these commands make it easier to control which Linux environment you want to use.
Method 8: Uninstall a Linux Distribution From WSL
If you no longer need a Linux distribution, you can remove it from WSL.
First, check the installed distributions:
wsl --list
Identify the distribution you want to remove.
Then use:
wsl --unregister Ubuntu
Replace Ubuntu with the name of the distribution you want to remove.
Important: unregistering a distribution permanently deletes its Linux filesystem and the files stored inside that distribution. Make sure you have backed up anything important before using the command.
If you simply want to stop using WSL temporarily, you do not need to unregister the distribution. You can leave it installed and launch it whenever required.
Conclusion
Windows Subsystem for Linux makes it possible to use a Linux environment directly on Windows 11 without setting up a separate Linux installation. The wsl --install command provides the simplest way to get started, while additional WSL commands let you install specific distributions, check versions, update WSL, access Windows files, and manage multiple Linux environments.
For most users, installing WSL 2 with a distribution such as Ubuntu is a good starting point. Once installed, you can use Linux commands and applications alongside your existing Windows software and switch between the two environments whenever necessary.
FAQs
1. Is WSL free on Windows 11?
Yes. WSL is a Windows feature that can be used without purchasing a separate Linux license. Linux distributions available through WSL may have their own licensing terms.
2. Do I need to install Linux separately to use WSL?
No. WSL allows you to install a supported Linux distribution directly through Windows. You do not need to create a separate partition or dual-boot configuration.
3. Is WSL 2 better than WSL 1?
For most modern use cases, WSL 2 is the preferred version because it provides a more complete Linux environment and better compatibility with many Linux applications and development tools.
4. Can I access my Windows files from WSL?
Yes. Windows drives are generally available through paths such as /mnt/c, allowing you to access files stored on your Windows installation from the Linux environment.
Quick Summary
- Install WSL quickly with
wsl --installfrom an administrator Terminal. - Install a specific Linux distribution with
wsl --install -d <Distribution>. - Use
wsl --list --verboseto check installed distributions and their WSL versions. - Access Windows drives from Linux through paths such as
/mnt/c.





