18.6 C
New York

How to Run Linux on Windows 11: A Detailed Guide

Published:

With Windows 11, Microsoft has made it easier than ever to run Linux directly on your Windows system. Whether you’re a developer, system administrator, or just a tech enthusiast, running Linux alongside Windows can provide the best of both worlds. In this guide, we’ll explore the different methods to run Linux on Windows 11, including:

  1. Windows Subsystem for Linux (WSL/WSL 2)
  2. Virtual Machines (VM) with Hyper-V or VirtualBox
  3. Dual Booting Windows 11 and Linux

We’ll cover each method in detail with step-by-step instructions.


Method 1: Windows Subsystem for Linux (WSL/WSL 2)

WSL allows you to run a full Linux environment directly within Windows 11 without the overhead of a virtual machine. WSL 2, the latest version, offers improved performance and full system call compatibility.

Step 1: Enable WSL in Windows 11

  1. Open PowerShell as Administrator (Right-click Start Menu → “Windows Terminal (Admin)”).
  2. Run the following command to enable WSL:
   wsl --install

This command installs WSL and the default Linux distribution (Ubuntu).

  1. If WSL is not enabled, manually enable it with:
   dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
   dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Restart your computer when prompted.

Step 2: Install a Linux Distribution

  1. Open the Microsoft Store and search for your preferred Linux distribution (e.g., Ubuntu, Debian, Kali Linux).
  2. Click Install and wait for the download to complete.
  3. Launch the distribution from the Start Menu.

Step 3: Set Up WSL 2 (Recommended for Better Performance)

  1. Check your WSL version:
   wsl --list --verbose
  1. If it’s using WSL 1, upgrade to WSL 2:
   wsl --set-version <DistributionName> 2

Replace <DistributionName> with your installed distro (e.g., Ubuntu).

  1. Set WSL 2 as the default:
   wsl --set-default-version 2

Step 4: Access Linux Files from Windows

WSL mounts the Linux file system under:

\\wsl$\<DistroName>\

You can browse files in File Explorer.


Method 2: Run Linux in a Virtual Machine (Hyper-V or VirtualBox)

If you need a full Linux desktop experience, running a VM is a great option.

Option A: Using Hyper-V (Windows Pro/Enterprise Only)

  1. Enable Hyper-V:
powershell Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -NoRestart
  • Restart your PC.
  1. Create a New Virtual Machine:
  • Open Hyper-V Manager.
  • Click New → Virtual Machine.
  • Follow the wizard to allocate RAM, create a virtual disk, and attach a Linux ISO (e.g., Ubuntu).
  • Start the VM and install Linux.

Option B: Using VirtualBox (Free & Works on Windows Home)

  1. Download & Install VirtualBox from virtualbox.org.
  2. Download a Linux ISO (e.g., Ubuntu, Fedora).
  3. Create a New VM:
  • Open VirtualBox → Click New.
  • Set RAM (at least 2GB) and create a virtual disk (20GB+ recommended).
  • Attach the Linux ISO and start the VM.
  • Follow the installation steps.

Method 3: Dual Boot Windows 11 and Linux

For maximum performance, you can install Linux alongside Windows 11.

Step 1: Prepare a Bootable USB Drive

  1. Download a Linux ISO (e.g., Ubuntu).
  2. Use Rufus (rufus.ie) to create a bootable USB.

Step 2: Disable Secure Boot & Fast Startup

  1. Go to Settings → System → Power & Sleep → Additional Power Settings → Choose what the power buttons do.
  2. Click Change settings currently unavailable and uncheck “Turn on fast startup”.
  3. Restart and enter BIOS/UEFI (usually by pressing F2/DEL).
  4. Disable Secure Boot (varies by motherboard).

Step 3: Install Linux Alongside Windows

  1. Boot from the USB (press F12/ESC during startup to select boot device).
  2. Choose “Install Ubuntu alongside Windows Boot Manager”.
  3. Follow the installation prompts.
  4. After installation, you’ll see a GRUB bootloader to choose between Windows and Linux at startup.

Conclusion

Running Linux on Windows 11 is easier than ever with WSL, VMs, or dual booting.

  • For developers: WSL 2 is the best choice.
  • For full desktop experience: Use a VM (Hyper-V or VirtualBox).
  • For maximum performance: Dual boot Linux and Windows.

Related articles

Recent articles