To install WSL (Windows Subsystem for Linux) on Windows 10, open PowerShell as an Administrator and run the command wsl --install. This single command enables the necessary virtual machine platform, activates the WSL feature, and downloads the default Ubuntu Linux distribution. This process allows you to run a full Linux environment directly on Windows without the overhead of a traditional virtual machine or the need to dual-boot your computer.

WSL bridges the gap between Windows and Linux, allowing developers and power users to use Linux command-line tools, bash scripts, and programming languages alongside their standard Windows applications. Because it integrates directly with the Windows file system, you can access your Windows files from within Linux and vice versa, making it an ideal environment for web development, data science, and learning the Linux terminal.

What You'll Need

  • A PC running Windows 10 (Version 2004 or higher, Build 19041 or higher).
  • Administrative privileges on the local Windows account to enable system features.
  • An active internet connection to download the Linux kernel and distribution files.
  • Hardware virtualization enabled in the system BIOS or UEFI settings.

Step-by-Step

  1. Check System Compatibility: Before starting, ensure your Windows 10 version is up to date. Right-click the Start button, select System, and check the Windows specifications. If you are on a version older than 2004, run Windows Update to get the latest build.
  2. Enable Virtualization in BIOS: Restart your computer and enter the BIOS/UEFI menu (usually by pressing F2, F10, or Del during boot). Look for a setting labeled "Intel Virtualization Technology," "VT-x," "AMD-V," or "SVM Mode" and ensure it is set to Enabled. Save changes and exit.
  3. Open PowerShell as Administrator: Click the Start menu, type "PowerShell," right-click on Windows PowerShell, and select Run as administrator. This is required because enabling WSL modifies system-level features.
  4. Run the Install Command: In the PowerShell window, type the following command and press Enter: wsl --install This command automates several steps: it enables the Virtual Machine Platform and Windows Subsystem for Linux optional features and downloads the latest Linux kernel.
  5. Restart Your Computer: Once the command completes, Windows will notify you that a restart is required. Save all open work and restart your PC to finalize the installation of the virtualization components.
  6. Complete the Linux Setup: After restarting, the Ubuntu installation window will open automatically. If it does not, find "Ubuntu" in your Start menu and launch it. You will see a message saying "Installing, this may take a few minutes."
  7. Create Your User Account: When prompted, enter a username and a password. Note that when typing the password in the Linux terminal, no characters or asterisks will appear on the screen; this is a standard security feature in Linux. Press Enter to confirm.
  8. Update the Package List: Once you reach the command prompt, it is best practice to update your installed software. Type the following command and press Enter: sudo apt update && sudo apt upgrade -y You will be asked for the password you created in the previous step.

Common Mistakes

One of the most frequent mistakes is forgetting to run PowerShell as an administrator. If you run the install command in a standard user window, you will receive an "Access Denied" error or a message stating that the command is not recognized. Always ensure the window title explicitly says "Administrator: Windows PowerShell."

Another common error is attempting to install WSL without enabling hardware virtualization in the BIOS. Many users assume that because they have a modern CPU, virtualization is on by default. However, many motherboard manufacturers ship PCs with this disabled. If you see an error regarding the "Virtual Machine Platform," the BIOS is the first place to check.

Users often get confused during the password creation phase. Because the cursor does not move and no dots appear while typing the password, many people believe their keyboard is broken or the system has frozen. This is normal Linux behavior. Simply type the password blindly and hit Enter.

Finally, some users try to install WSL on "Windows 10 Home" versions that are very old. While WSL 2 is supported on Home editions, it requires the specific build versions mentioned in the requirements. If the --install command fails, updating Windows is the primary solution.

Tips

To improve your experience, download the "Windows Terminal" app from the Microsoft Store. The default PowerShell or Command Prompt windows are functional, but Windows Terminal provides a modern interface with multiple tabs, customizable themes, and better support for Linux colors and fonts.

Managing files between Windows and Linux is easier than it seems. To open your current Linux directory in the Windows File Explorer, type explorer.exe . (including the period) in the WSL terminal. This opens a folder window showing your Linux files in a familiar Windows interface.

If you need a different Linux distribution other than Ubuntu, you can find others—such as Debian, Kali Linux, or openSUSE—directly in the Microsoft Store. Once WSL is installed, you can install multiple distributions and run them side-by-side.

Keep your Linux environment lean. Only install the packages you need. Using sudo apt install is the standard way to add software, but always run sudo apt update first to ensure you are downloading the most recent stable version of the software.

Troubleshooting

If the wsl --install command does not work, you may need to enable the features manually. Go to Control Panel > Programs > Programs and Features > Turn Windows features on or off. Check the boxes for "Windows Subsystem for Linux" and "Virtual Machine Platform." Click OK and restart your computer. After the restart, try installing the distribution from the Microsoft Store.

If you encounter the error "WslRegisterDistribution failed with error: 0x800701bc," it means the WSL 2 kernel update is missing. You can fix this by downloading the official MSI update package from the Microsoft website and running the installer manually. This updates the Linux kernel to the latest version required for WSL 2.

If the terminal feels sluggish or consumes too much RAM, you can limit its resource usage. Create a file named .wslconfig in your Windows user profile folder (C:\Users\YourName\.wslconfig). Inside this text file, you can specify memory limits, such as memory=4GB, under a [wsl2] header. Save the file and restart WSL by running wsl --shutdown in PowerShell.

In cases where the Linux distribution fails to launch after a Windows update, try resetting the app. Go to Settings > Apps > Apps & features, find the Ubuntu app, select Advanced options, and click Reset. Warning: This may delete some configuration settings within the Linux environment, though it rarely deletes the entire filesystem.

Frequently Asked Questions

Can I run GUI apps in WSL?

Yes, if you are on a recent build of Windows 10, WSL supports Linux GUI applications. You can install a GUI app via the terminal, and it will appear as a separate window on your Windows desktop.

Does WSL replace my Windows OS?

No, WSL is a compatibility layer. It runs Linux as a subsystem inside Windows. You do not lose any Windows functionality, and you can run both systems simultaneously.

What is the difference between WSL 1 and WSL 2?

WSL 1 translated Linux system calls into Windows system calls. WSL 2 uses a real Linux kernel running in a lightweight utility VM, providing full system call compatibility and significantly faster file system performance.

Can I access my Windows C: drive from Linux?

Yes, Windows drives are automatically mounted. You can find your C: drive by navigating to /mnt/c/ within the Linux terminal.

How do I shut down WSL to save battery?

WSL usually shuts down automatically when not in use, but you can force it to stop by opening PowerShell and typing wsl --shutdown. This kills all running Linux distributions and the VM.

Is WSL safe for beginners?

Yes, it is very safe. Because it runs in a virtualized environment, mistakes made inside the Linux terminal generally do not affect your Windows system files or boot record.