How to install linux on windows 10? The Windows Subsystem for Linux (WSL) is a game-changer for developers, sysadmins, and tech enthusiasts. It lets you run a full Linux environment natively on Windows 10/11 without dual-booting or virtual machines.
In this guide, you’ll learn:
- How to install and configure WSL 2 (the latest version as of 2023).
- Enable GPU acceleration for AI/ML workloads.
- Access Windows files from Linux (and vice versa).
- Troubleshoot common issues like virtualization errors.
Table of Contents
What is WSL in 2023?
WSL is a compatibility layer developed by Microsoft to run Linux binaries natively on Windows. Unlike virtual machines, WSL integrates directly with your OS, offering:
- Near-native performance for Linux tools (e.g., Python, Docker).
- GPU Passthrough for machine learning frameworks like TensorFlow.
- Systemd Support to manage background services (e.g., Docker, NGINX).
Why Developers Love WSL:
- Run Linux-only tools (e.g.,
apt
,grep
) alongside Visual Studio Code. - Test cross-platform apps without leaving Windows.
How to Install Linux on Windows 10? (Step 1: Install WSL on Windows 10/11)
Requirements
- Windows 10 (Build 19041+) or Windows 11.
- Virtualization Enabled in BIOS/UEFI (Intel VT-x/AMD-V).
- 4GB RAM (8GB+ recommended for heavy workloads).
Installation Steps
- Enable WSL:
- Open PowerShell as Admin and run:
wsl --install
- This installs WSL 2 and the default Ubuntu distribution.
- Open PowerShell as Admin and run:
- Restart Your PC.
- Launch Ubuntu:
- Open Ubuntu from the Start Menu.
- Create a Unix username and password (required for
sudo
commands).
Step 2: Install Custom Linux Distributions
- Open Microsoft Store and search for your preferred distro:
- Kali Linux (for penetration testing).
- Debian (for stability).
- Fedora (for cutting-edge packages).
- Click Install and launch the distro from the Start Menu.
Pro Tip: List installed distros with:
powershell
wsl --list --verbose
Step 3: Enable Advanced WSL Features
GPU Acceleration
- Install NVIDIA/CUDA Drivers or AMD ROCm for Windows.
- Run Linux GPU workloads (e.g., PyTorch) directly from WSL.
Systemd Support
- To enable systemd (for Docker, cron jobs), create
/etc/wsl.conf
:

- Restart WSL:

File Sharing
- Windows → Linux: Access files at
/mnt/c/Users/yourname
. - Linux → Windows: Navigate to
\\wsl$\Ubuntu\home\yourname
in File Explorer.
Troubleshooting Common Issues
Issue 1: “Virtualization Not Enabled”
Fix:
- Restart PC > Enter BIOS/UEFI (usually via
F2
/Del
). - Enable Intel VT-x, AMD-V, or SVM Mode.
Issue 2: WSL Fails to Start
Fix:
- Update Windows:

- Reset WSL:

How to Install Linux on Windows 10 (FAQ)
Q: Does WSL work on Windows 10 Home?
A: Yes! WSL 2 is supported on Windows 10 Home (Build 19041+).
Q: Can I run GUI Linux apps?
A: Yes! Install a third-party X server like GWSL or use Windows 11’s built-in GUI support.