Windows Subsystem for Linux, commonly called WSL, lets you run a genuine Linux environment—terminal, command-line tools, and even graphical apps—without leaving Windows 11. There is no virtual machine to fiddle with, no separate reboot, and no second account to manage. Instead, you get a real Linux kernel running in a lightweight, tightly integrated layer beside your regular Windows files.
This guide walks you through the full setup, from enabling the feature to navigating your first Linux terminal. By the end, you will be installing distros, switching between WSL versions, and moving files between Windows and Linux with confidence.
Before You Start
WSL 2 requires Windows 11, version 22H2 or later, or Windows 10, version 2004 or later. Most modern PCs already meet this bar, but you can confirm your version in Settings > System > About. You also need administrator rights on the PC and a stable internet connection to download a distribution from the Microsoft Store.
WSL is available on Windows 11 Home, Pro, Enterprise, and Education editions. The setup steps below are identical across all of them, so you can follow along regardless of your license.
Step 1: Check your Windows version and prerequisites
Open Settings and confirm your Windows build. Press Win + I to launch Settings, then navigate to System > About. Look for the “Version” number under Windows specifications and make sure it is 22H2 or higher for WSL 2. If you are on an older build, run Windows Update first, since WSL depends on recent kernel and virtualization components.
Checking this up front saves you from a confusing failure later. If the installer complains about an unsupported version, updating Windows is almost always the fix.
Step 2: Enable the WSL optional feature
Turn on WSL through PowerShell. Right-click the Start button and choose Terminal (Admin) or Windows PowerShell (Admin) to open a prompt with administrator rights. Type the following command and press Enter:
wsl --install
This single command does three things at once: it enables the WSL optional feature, turns on the Virtual Machine Platform that WSL 2 needs, and installs a default Linux distro. If the command reports that it cannot find a distro, you can add --distribution Ubuntu to name one explicitly.
After the command finishes, you must restart the PC so the new kernel and virtualization settings take effect. Skipping this reboot is the most common reason WSL appears to do nothing after setup.

Step 3: Install a Linux distribution
Open the Microsoft Store and pick a distro. After restarting, search the Store for the Linux distribution you want, such as Ubuntu, Debian, or Kali Linux. Click Get or Install and wait for the download to complete. The Store version is the most reliable route because Microsoft keeps each distro up to date automatically.
If you prefer a specific version or a distro not listed in the Store, you can download it directly from the publisher’s website and install the app package. Enterprise users who manage many machines can also deploy distros through Intune or configuration manager using the appx packages.
Ubuntu is the best choice for beginners because it has the largest community, the most tutorials, and the widest software support. Pick something you already have documentation for, and future problems become much easier to solve.
Step 4: Complete your distro’s initial setup
Launch the new distro and create an account. Find your distro in the Start menu or search results and click it to open a Linux terminal window. The first launch asks you to create a UNIX username and a password. Type a short username like yourname, then enter a password twice.
When you type the password, nothing appears on screen—not asterisks or dots. This is normal Linux behavior designed to prevent shoulder-surfing, so type carefully and press Enter. Once the account is created, the terminal shows a Linux-style prompt ending in a dollar sign or hash.
Remember this username and password, because you will need them to install software later. They are separate from your Windows Microsoft account password, which often confuses first-time users.
Step 5: Update your Linux packages
Refresh the package list and upgrade existing software. In the Linux terminal, type the following and press Enter:
sudo apt update && sudo apt upgrade -y
The sudo prefix runs the command with administrator privileges inside Linux, and you will be asked for the Linux password you created earlier. apt update fetches the latest software catalog, while apt upgrade installs any available updates. The -y flag answers “yes” to every prompt so the process runs to completion without interruption.
This step can take several minutes and may show a progress bar that seems stuck. Give it time, since it is downloading and unpacking dozens of packages. If it asks about configuration changes, pressing Enter to accept the defaults is safe.
Pro Tip: Keep this update habit in mind whenever you install new software. Running sudo apt update first ensures you download the newest version of each package instead of an outdated one.
Step 6: Learn the basics of the Linux terminal
Practice a handful of everyday commands. Start by typing ls to list files in your current folder, then pwd to see the full path you are standing in. Create a project folder with mkdir myproject, move into it with cd myproject, and open a text file with nano hello.txt.
The nano editor shows simple instructions along the bottom edge of the window, so you can save with Ctrl + O and exit with Ctrl + X without memorizing anything. Try creating a short note, saving it, and reading it back with cat hello.txt.
These six commands cover most daily navigation. Linux terminals reward curiosity, so experiment freely—nothing you type here can damage your Windows installation.
Step 7: Move files between Windows and Linux
Access your Windows files from inside Linux. All your Windows drives appear under the /mnt folder in the Linux filesystem. Type ls /mnt/c to list your main Windows drive, or navigate directly with cd /mnt/c/Users/YourName. Replace YourName with your actual Windows account name.
To reach Linux files from Windows, open File Explorer and type \\wsl$ in the address bar. You will see each installed distro as a folder, giving you full drag-and-drop access to your Linux files.
Write performance differs between the two directions. Files stored inside Linux run fast, while files accessed across the /mnt boundary run slower because they cross the Windows-Linux filesystem border. Keep large, frequently edited files on the Linux side for the best speed.
Step 8: Switch between WSL 1 and WSL 2
Check which version each distro is running. Return to an elevated PowerShell window and type wsl -l -v. This lists every installed distro alongside its version number. WSL 2 uses a real virtual machine and offers far better performance, while WSL 1 runs directly on Windows without virtualization.
If a distro shows version 1 and you want the faster WSL 2, convert it with wsl --set-version <distro-name> 2. The command downloads the lightweight VM component on the first run, so allow a few minutes for it to finish.
Most users should run WSL 2 for the speed and full system-call compatibility. Keep a distro on WSL 1 only if you need to share files directly with a Windows program that cannot read the virtual hard disk.
Step 9: Install common developer tools
Add the tools you actually need. With your distro updated, install languages and utilities through the package manager. For example, type sudo apt install git python3 nodejs to add version control, Python, and Node.js in one step.
Once installed, verify each tool by typing its name with a version flag, such as python3 --version or git --version. If a command is not found, the package may have installed under a different name, so check the package’s documentation for the correct executable.
Enterprise users managing fleets can preinstall these packages into a base distro image, then deploy that image to many machines at once. This keeps every developer’s environment identical and removes manual setup from the onboarding process.
Troubleshooting
The command ‘wsl’ is not recognized. This usually means WSL never finished installing, or your PowerShell session opened without administrator rights. Close the window, reopen PowerShell as administrator, and retype wsl --install. If the error persists, open Control Panel > Programs > Turn Windows features on or off and confirm that “Windows Subsystem for Linux” is checked.
The distro opens then closes immediately. This typically happens when the initial setup never completed or the virtual machine platform did not start. Restart the PC to apply kernel changes, then relaunch the distro from the Start menu. If it still vanishes, open PowerShell as administrator and run wsl --update to refresh the WSL kernel.
WSL runs slowly or applications hang. The most frequent cause is running your work from the Windows side inside a WSL 2 distro. Move your project files into the Linux filesystem under ~/ instead of /mnt/c, and performance usually improves dramatically. You can also verify you are on WSL 2 with wsl -l -v and convert a slow distro as described in Step 8.
Closing Tips
Keep your distros tidy by using wsl --shutdown in PowerShell to reset the entire subsystem when something acts strangely. Update your distro periodically with sudo apt update && sudo apt upgrade to stay secure. And remember that the Linux terminal is forgiving—experiment freely, since every command runs safely inside the isolated Linux environment.
Once WSL is running, you have a professional-grade Linux workspace available in seconds, with no risk to your Windows setup. Start with Ubuntu, build a couple of small projects, and expand from there as your needs grow.
Over to you: Which Linux distro have you tried with WSL, and what was your first project?



