Although it's now possible to run a number of Linux distros natively on Windows 10, these environments can be somewhat limited in features and tools you can use. Also, you can only pick from three distros, including Ubuntu, SUSE Linux Enterprise, and OpenSUSE Leap, and you're stuck with the command-line interface, which means that you can't run any of the graphical experiences (e.g., GNOME, KDE, XFCE) or Linux-based graphical applications.

Of course, you can always install your favorite Linux distro on a second machine, but if you don't have one, it's still possible to run a full-blown version of Linux using a virtual machine (VM).

If you're running Windows 10, you can enable Hyper-V on your device to create a VM to install your preferred distro whether you're a developer or an enthusiast who just wants to know what's the Linux fuzz all about.

In this Windows 10 guide, we'll walk you through the steps to install most Linux distributions on virtual machines using Microsoft's Hyper-V virtualization feature.

Guide requirements

To run a Linux virtual machine on Windows 10, you'll need the following:

  • A computer with support for Hyper-V.
  • An ISO file to install your preferred Linux distribution.

In this guide, we'll be using Ubuntu version 17.10, which you can download from the official Ubuntu website. However, it's possible to install version 16.04, which might be a more stable version of the open source project, and you can also install other distros, including:

  • CentOS and Red Hat Enterprise Linux.
  • Debian.
  • SUSE.
  • Oracle Linux.
  • FreeBSD.

How to enable Hyper-V on Windows 10

Hyper-V is a virtualization technology from Microsoft available on Windows 10 Pro, Enterprise, and Education, and it allows you to create one or multiple virtual machines to install and run different OSes on the same physical hardware.

Verifying Hyper-V support

Although Hyper-V is part of Windows 10, there is a minimum hardware requirement a computer must meet to enable the feature.

  • 64-bit CPU with Second Level Address Translation (SLAT).
  • Processor must support VM Monitor Mode Extension (VT-c on Intel chips).
  • 4GB of memory at a minimum.

In addition, you have to make sure the Virtualization Technology and Hardware Enforced Data Execution Prevention options are enabled on your system BIOS.

You can quickly verify your computer has the required support for Hyper-V using Systeminfo:

  1. Open Start.
  2. Search for Command Prompt and click the top result.
  3. Type the following command and press Enter:

    systeminfo.exe

  4. Under Hyper-V Requirements, if the result reads Yes, then you can run Hyper-V.

If the command displays No under Hyper-V Requirements, then your hardware doesn't support this feature, or you need to make sure to enable it manually.

Enabling Hyper-V

Use the following steps to enable Hyper-V on Windows 10:

  1. Open Control Panel.
  2. Click on Programs.
  3. Click on Turn Windows features on or off.

  4. Check the Hyper-V option making sure: Hyper-V Management Tools and Hyper-V Platform are also selected.
  5. Click OK to begin the process.

  6. After the installation completes, click Restart now to apply the changes.

How to create a virtual machine using Hyper-V

Once you've completed adding the virtualization layer to Windows 10, you'll need to create a virtual machine for the Linux distribution you want to use.

However, before you do that, you must create a virtual switch to allow the VM to connect to the internet.

Creating a virtual switch

Use the following steps to configure a virtual switch on Hyper-V:

  1. Open Start.
  2. Search for Hyper-V Manager and click the top result.
  3. Click on the Action menu.
  4. Select New and click on Virtual Switch Manager.

  5. On the left pane, select New virtual network switch.
  6. On the right, select External.
  7. Click the Create Virtual Switch button.

  8. Enter a new descriptive name for the switch (e.g., MyVirtualSwitch).
  9. Under connection type, make sure your network adapter is select on External network.
  10. Click Apply.
  11. Click OK.

Creating a virtual machine

After creating the virtual switch, you can proceed to create a new virtual machine:

  1. Open Start.
  2. Search for Hyper-V Manager and click the top result.
  3. Click on the Action menu.
  4. Select New and click on Virtual Machine.

  5. Click the Next button.
  6. Enter a descriptive name for your virtual machine (e.g., vm-ubuntu).

  7. Use the default location to store your virtual machine, or check the Store the virtual machine in a different location option to select a different path.
  8. Click Next to continue.
  9. You can leave the default Generation 1 option selected. Or you can select Generation 2 if you want a UEFI-based firmware.
  10. Click Next.

  11. Select the amount of RAM to allocate for your virtual machine. In the case of Ubuntu, you need a minimum of 2GB of memory.

    You can allocate as much memory as you want, but this setting will always depend on the physical memory available on your computer.

  12. Click Next.

  13. Use the drop-down menu to select the virtual switch you created earlier.
  14. Click Next.

  15. You can leave all the default settings to create a virtual hard drive, but under Size make sure to allocated at least 25GB of storage, which is the minimum required to run Ubuntu.
  16. Click Next to continue.

  17. On Installation options, select the Install an operating system from a bootable CD/DVD-ROM option.
  18. Select the Image file (.iso) option.
  19. Select the path for the ISO file with the Ubuntu installation files.
  20. Click Next.

  21. Click Finish.

How to install Ubuntu Linux using Hyper-V on Windows 10

The last step is to start the virtual machine and install the Linux distribution you want to use.

  1. On Hyper-V Manager, under Virtual Machine, right-click the newly created device, and select Connect.

  2. Click the Start (power) button.

  3. Select your language.
  4. Click the Install Ubuntu button.

  5. Check the Install third-party software for graphics and Wi-Fi hardware, Flash, MP3 and other media option.
  6. Click Continue.

  7. Select the Something else option.
  8. Click Continue.

  9. Double-click the /dev/sda drive.

  10. Click Continue.
  11. Double-click free space.

  12. Under "Use as," use the drop-down menu and select Swap area to create a swap partition.
  13. Under "Size," select the amount of space for the swap partition, which should be about 2x of the amount of RAM allocated for the virtual machine.
  14. Click OK.

  15. Double-click free space again.

  16. Select the amount of space to allocate for the installation.
  17. Under "Mount point," use the drop-down menu and select root /.
  18. Click OK.

  19. Select the ext4 partition from the list.
  20. Click the Install Now button.

  21. Click Continue to install Ubuntu.
  22. Select your time zone.
  23. Click Continue.

  24. Select the keyboard layout.
  25. Click Continue.

  26. Create a user account with your information.
  27. Click Continue.

  28. Restart the virtual machine to finish the setup.

    Quick Tip: If during the final restart process, you get a message to remove the installation and press Enter, but hitting the key won't restart the VM, just click the Turn off button and then turn it back on again.

After completing the steps, you can just turn on the VM and start using Ubuntu Linux alongside Windows 10.

While we're focusing this guide setting up Ubuntu, you can also refer to these instructions to run other distributions of Linux.

More Windows 10 resources

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