How to dual-boot Windows 11 and Linux: If you are a developer, network administrator, or advanced user who needs to use Linux tools on Windows 11 version 22H2 or 21H2, you don’t need a second computer because 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 set of components and integrations that allow you to install various Linux distributions (such as Ubuntu, Kali, Debian, and others) without the desktop experience and overhead of a virtual machine. You can use this platform to run command-line and graphical tools, as well as interact with Windows components via the Linux shell.
If you prefer the desktop experience that Linux provides or prefer a more traditional experience, you can create and install any distribution on a virtual machine using Microsoft Hyper-V technology. This solution allows you 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 Windows 11 and Linux on your PC
How to run Linux with WSL on Windows 11
Here is how to install a Linux distro (such as Ubuntu) on Windows 11:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to install WSL and Ubuntu Linux on Windows 11 and press Enter: wsl –install
- (Optional) Type the following command to install WSL with a specific distro and press Enter: wsl –install -d DISTRO-NAME
A quick tip: You can use the wsl –list –online command to view the available distros.
- Restart the computer.
- Create an account and password for the Linux installation prompt after the computer reboots.
Once the steps are completed, you can start the Linux terminal to run commands, scripts, and different tools.
Install GUI apps
The Windows Subsystem for Linux install command also includes the components needed to run graphical apps, so you can install your favorite GUI applications.
Here is how to install graphical apps in the WSL version of Linux:
- Open Start.
- Search for Ubuntu (or the distro you installed) and click the top result to spin the distro.
- Type the following command to download the package information and press Enter: sudo apt update
- Type the following command to install an app and press Enter: sudo apt install APP-NAME
Change the APP-NAME in the command to the name of the app you want to install. For example, the following command installs the GIMP application: apt-get install gimp
After completing the steps, the application will be registered in the system and accessible for uninstallation via the Start menu and the “Installed apps” page.
You may also like: How to run Google Play Store and Android Apps on Windows 11
How to run Linux with VM (Virtual Machine) on Windows 11
If you prefer a more traditional virtual machine experience with access to the Linux desktop interface, enable the Hyper-V Manager app, create a virtual machine, and install the desired distro.
Enable Hyper-V on Windows 11
Here is how to enable Hyper-V on Windows 11:
- Open Settings.
- Click on Apps.
- Click the Optional features page on the right side.
- Under the “Related settings” section, click the “More Windows features” setting.
- Check the Hyper-V option.
- Click the OK button.
- Click the Restart now button.
Once the above steps are completed, you can proceed to create a virtual machine.
Create Linux virtual machine
There are two ways to create a virtual machine in Windows 11. You can use the quick method, which automatically downloads one of the available Ubuntu versions and sets up the virtual machine. You can also manually create a VM that allows you to install any Linux distribution.
Here is how to use the “Quick Create” feature on Hyper-V to set up a Linux virtual machine:
- Open Start.
- Search for Hyper-V and select the top result to open the app.
- Click on Actions from the top navigation and select the Quick Create option.
- Select the version of Ubuntu to install on Windows 11.
- Click the “Create Virtual Machine” button.
- Click the Connect button.
- Click the Start button.
- Select your language.
- Click the Continue button.
- Select the keyboard layout.
- Click the Continue button.
- Select your location.
- Click the Continue button.
- Create a user account and password.
- Click the Continue button.
After completing the steps above, you can start using Ubuntu Linux alongside Windows 11 with a graphical desktop experience.
You may also like: How to install the elementary OS on WSL for Windows
Create Linux virtual machine
Alternatively, you can create a virtual machine manually using the ISO file of your favourite Linux distribution.
Here is how to create a Linux Hyper-V VM on Windows 11:
- Open Start.
- Search for Hyper-V and select the top result to open the app.
- Click on Actions from the top navigation, select New and choose the Virtual Machine option.
- Confirm a name for the machine.
- (Optional) Check the “Store the virtual machine in a different location” option and specify the location to store the Linux machine.
- Click the Next button.
- Select the Generation 1 option.
Please keep in mind that this option is dependent on the operating system you wish to install. You can use this Microsoft documentation website to assist you in making a decision. When using Linux, the “Generation 1” option is usually the best choice.
- Click the Next button.
- Specify the amount of memory to reserve for the virtual machine.
- Check the “Use Dynamic Memory for this virtual machine” option.
- Click the Next button.
- Select the Default Switch for the “Connection” setting.
- Click the Next button.
- Select the “Create a virtual hard disk” option.
- Specify a name for the virtual drive.
- Specify the size of the virtual drive to install the Linux distro.
- Click the Next button.
- Select the “Install an operating system from a bootable image file” option.
- Click the Browse button.
- Select the Linux distro ISO file.
- Click the Open button.
- Click the Next button.
- Click the Finish button.
- Select the virtual machine from Hyper-V Manager and click the Start button.
- Click the Connect button.
- Continue with the on-screen directions to install the Linux distro.
You may also like: Download Windows 11 SE Wallpaper
After completing the steps above, the Linux distribution will install on the virtual machine with either a graphical or command-line interface, depending on the distro you installed.
You can install and run as many distros as your computer’s hardware allows, whether you use the Windows Subsystem for Linux or a Microsoft Hyper-V virtual machine.
Would you like to read more about How to dual-boot Windows 11 and Linux-related articles? If so, we invite you to take a look at our other tech topics before you leave!