How to run any Linux distro alongside Windows 11

Windows 11 running Linux
Windows 11 running Linux (Image credit: Future)

On Windows 11 version 22H2 (opens in new tab) or 21H2, if you are a developer, network administrator, or advanced user who needs to use Linux tools, you don't need a second computer since the system offers different solutions to run Linux alongside Windows, including the Windows Subsystem for Linux and Hyper-V.

The Windows Subsystem for Linux is a collection of components and integrations that allows you to install various distributions of Linux (such as Ubuntu, Kali, Debian, etc.) without the desktop experience and the overhead of a virtual machine. Using this platform, you can run command-line and GUI tools as well as interact with Windows components from the Linux shell.

If you prefer to have access to the desktop experience that Linux has to offer or want a more traditional experience, you can create and install any distribution on a virtual machine using the Microsoft Hyper-V technology. This solution provides the ability to create a virtual machine with custom settings to install and run Linux alongside Windows 11.

This guide will walk you through two approaches to setting up and running Linux distributions alongside Windows 11.

How to run Linux with WSL on Windows 11

To install a Linux distro (such as Ubuntu) on Windows 11, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to install WSL and Ubuntu Linux on Windows 11 and press Enterwsl --install

(Image credit: Future)
  1. (Optional) Type the following command to install WSL with a specific distro and press Enterwsl --install -d DISTRO-NAME 
  • Quick tip: You can use the wsl --list --online command to view the available distros.
  1. Restart the computer.
  2. Create an account and password for the Linux installation prompt after the computer reboots.

(Image credit: Future)

Once you complete the steps, you can start the Linux terminal to run commands, scripts, and different tools.

Install GUI apps

The Windows Subsystem for Linux install command also adds the components to run graphical apps, which means you can install your favorite GUI apps.

To install graphical apps in the WSL version of Linux, use these steps:

  1. Open Start.
  2. Search for Ubuntu (or the distro you installed) and click the top result to spin the distro.
  3. Type the following command to download the package information and press Entersudo apt update

(Image credit: Future)
  1. Type the following command to install an app and press Entersudo apt install APP-NAME

(Image credit: Future)

In the command, change the APP-NAME for the name of the app you want to install. For example, this command installs the GIMP app: sudo apt install gimp

After you complete the steps, the application will register in the system, making it available through the Start menu and the "Installed apps" page to uninstall.

How to run Linux with VM on Windows 11

If you prefer to use a more traditional virtual machine experience with access to the Linux desktop interface, you will need to enable the Hyper-V Manager app, create a virtual machine, and install the distro you want. 

Enable Hyper-V on Windows 11

To enable Hyper-V on Windows 11, use these steps:

  1. Open Settings.
  2. Click on Apps.
  3. Click the Optional features page on the right side.

(Image credit: Future)
  1. Under the "Related settings" section, click the "More Windows features" setting.

(Image credit: Future)
  1. Check the Hyper-V option.

(Image credit: Future)
  1. Click the OK button.
  2. Click the Restart now button.

Once you complete the steps, you can proceed to create a virtual machine. 

Create Linux virtual machine (quickly)

On Windows 11, you have two ways to create a virtual machine. You can use the quick method that downloads one of the available versions of Ubuntu and sets up the virtual machine automatically. Or you can create a VM manually that allows you to install any Linux distribution.

To use the "Quick Create" feature on Hyper-V to set up a Linux virtual machine, use these steps:

  1. Open Start.
  2. Search for Hyper-V and select the top result to open the app.
  3. Click on Actions from the top navigation and select the Quick Create option.

(Image credit: Future)
  1. Select the version of Ubuntu to install on Windows 11.
  2. Click the "Create Virtual Machine" button.

(Image credit: Future)
  1. Click the Connect button.

(Image credit: Future)
  1. Click the Start button.

Hyper-V start Ubuntu

(Image credit: Future)
  1. Select your language.
  2. Click the Continue button.

Ubuntu setup language

(Image credit: Future)
  1. Select the keyboard layout.
  2. Click the Continue button.

(Image credit: Future)
  1. Select your location.
  2. Click the Continue button.

(Image credit: Future)
  1. Create a user account and password.
  2. Click the Continue button.

(Image credit: Future)

After you complete the steps, you can start using Ubuntu Linux alongside Windows 11 with a graphical desktop experience.

Create Linux virtual machine (manually)

Alternatively, you can create a virtual machine manually using the ISO file of your favorite Linux distribution.

To create a Linux Hyper-V VM on Windows 11, use these steps:

  1. Open Start.
  2. Search for Hyper-V and select the top result to open the app.
  3. Click on Actions from the top navigation, select New and choose the Virtual Machine option.

(Image credit: Future)
  1. Confirm a name for the machine.
  2. (Optional) Check the "Store the virtual machine in a different location" option and specify the location to store the Linux machine.

(Image credit: Future)
  1. Click the Next button.
  2. Select the Generation 1 option.

(Image credit: Future)
  • Quick note: This option will depend on the operating system you want to install. You can check this Microsoft documentation website (opens in new tab) to help you make a choice. Usually, the "Generation 1" option would be your best option when using Linux.
  1. Click the Next button.
  2. Specify the amount of memory to reserve for the virtual machine.
  3. Check the "Use Dynamic Memory for this virtual machine" option.

(Image credit: Future)
  1. Click the Next button.
  2. Select the Default Switch for the "Connection" setting.

(Image credit: Future)
  1. Click the Next button.
  2. Select the "Create a virtual hard disk" option.
  3. Specify a name for the virtual drive.
  4. Specify the size of the virtual drive to install the Linux distro.

(Image credit: Future)
  1. Click the Next button.
  2. Select the "Install an operating system from a bootable image file" option.
  3. Click the Browse button.
  4. Select the Linux distro ISO file.
  5. Click the Open button.

(Image credit: Future)
  1. Click the Next button.
  2. Click the Finish button.
  3. Select the virtual machine from Hyper-V Manager and click the Start button.
  4. Click the Connect button.

(Image credit: Future)
  1. Continue with the on-screen directions to install the Linux distro.

Once you complete the steps, the distribution of Linux will install on the virtual machine with a graphical or command experience, depending on the distro you installed.

Whether you choose to use the Windows Subsystem for Linux or Microsoft Hyper-V virtual machine, you can install and run as many distros as the hardware on your computer allows.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources: