Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Run Linux in Windows 10: Easy Step-by-Step Guide

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Running Linux within Windows 10 allows you to enjoy the flexibility and power of a Linux environment without needing to set up a separate machine or dual boot. Whether you're a developer, a Linux enthusiast, or someone who wants to try Linux without risking your main system, this guide will walk you through the process of installing and using Linux on Windows 10 seamlessly. Before starting, ensure your system meets the necessary requirements and back up important data to prevent any accidental loss.

What You'll Need

  • A Windows 10 PC with administrator rights
  • At least 20 GB of free storage space
  • Stable internet connection
  • Optional: A USB drive (if installing via USB)
  • Basic familiarity with Windows and command-line operations

Step-by-Step

  1. Enable the Windows Subsystem for Linux (WSL): Open PowerShell as Administrator. Type dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart and press Enter. This activates WSL, which allows running Linux directly inside Windows.
  2. Enable Virtual Machine Platform: Still in PowerShell, execute dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart . This is necessary for WSL 2, which offers better performance and compatibility.
  3. Restart your PC: After enabling these features, reboot your system to apply changes.
  4. Update to WSL 2: Open Command Prompt or PowerShell as administrator, then run wsl --set-default-version 2 . This sets WSL 2 as the default version for new Linux installations.
  5. Download a Linux distribution from Microsoft Store: Open the Microsoft Store app, search for your preferred Linux distro (such as Ubuntu, Debian, Kali Linux), and click Install.
  6. Launch your Linux distribution: Once installed, click Launch from the Store or find it in the Start menu. The first time you open it, you'll be prompted to set up a username and password for your Linux environment.
  7. Update your Linux environment: Inside the Linux terminal, run sudo apt update && sudo apt upgrade to ensure all packages are current.
  8. Optional: Install additional tools: Depending on your needs, you can install software like Git, Python, or other Linux utilities using your distro's package manager.

Common Mistakes

  • Not enabling WSL or Virtual Machine Platform before installing Linux — this will cause installation failures.
  • Using an outdated Windows version — WSL 2 requires Windows 10 version 2004 or higher.
  • Not restarting after enabling features — changes won't take effect until a reboot.
  • Trying to install Linux without updating to WSL 2 — WSL 1 has limitations; WSL 2 is recommended for better performance.
  • Ignoring driver or hardware compatibility issues — some features may not work properly without updated drivers.

Tips

  • Set your Linux distro to automatically update to WSL 2 with wsl --set-version 2 .
  • Use Windows Terminal for a better command-line experience, supporting multiple tabs and themes.
  • Integrate Linux commands into Windows workflows using scripts or shortcuts.
  • Back up your Linux environment periodically, especially if you plan to do intensive development work.
  • Explore Windows Subsystem for Linux GUI support in Windows 10 21H2 or later, enabling you to run Linux apps with graphical interfaces.

Troubleshooting

If you encounter issues during installation or operation, try these steps:

  • Check Windows version: Ensure you have Windows 10 version 2004 or later. Update Windows if necessary.
  • Verify feature activation: Confirm that WSL and Virtual Machine Platform features are enabled via Windows Features or PowerShell.
  • Reboot your system: Many issues resolve after a restart, especially after enabling features.
  • Update WSL: Run wsl --update to ensure you have the latest version.
  • Reset Linux distributions: If a Linux app crashes, try resetting it via Settings > Apps > Linux distribution > Advanced options > Reset.
  • Check logs and error messages: Use PowerShell or Command Prompt to run commands like wsl --list --verbose to diagnose issues.

Frequently Asked Questions

1. Can I run graphical Linux apps on Windows 10?

Yes, Windows 10 supports GUI Linux apps via WSL 2 with the latest updates, allowing you to run Linux programs with graphical interfaces.

2. Do I need to dual boot or partition my drive?

No, running Linux through WSL means you don’t need to partition your drive or dual boot; Linux runs alongside Windows within the same system.

3. Is WSL 2 faster than WSL 1?

Yes, WSL 2 offers better performance, improved filesystem compatibility, and supports full Linux kernel features compared to WSL 1.

4. Can I switch between different Linux distributions easily?

Absolutely. You can install multiple distributions from the Microsoft Store and manage them using the wsl command-line tool.

5. Will running Linux affect my Windows system stability?

Running Linux via WSL is safe and isolated; it won't interfere with your Windows stability unless there’s a specific software conflict.

6. How do I uninstall Linux distributions?

You can uninstall them through Windows Settings > Apps, or by using the command wsl --unregister <DistroName>.

Following these steps will enable you to run Linux smoothly within Windows 10, combining the best of both worlds for development, testing, or curiosity. With a bit of setup, you can enjoy Linux's flexibility without leaving your Windows environment.