How to Install Ubuntu on Windows with Hyper-V

Introduction

Since the introduction of Windows 10 Fall Creators Update, it's possible to run Ubuntu natively on Windows 10. However, there are limitations to running Ubuntu natively on Windows, such as being restricted to using the command-line interface.

Hyper-V offers a built-in way of creating and managing virtual machines on Windows 10. It allows you to install a distribution of Linux, including Ubuntu.

In this tutorial, we will go over the step-by-step process of installing Ubuntu 20.04 on a virtual machine using Hyper-V on Windows 10.

How to install Ubuntu on Windows with Hyper-V

Prerequisites

  • A system running Windows 10
  • An account with administrator-level privileges

Hyper-V Ubuntu Installation Guide

Following the steps outlined below, you can enable Hyper-V and start using it to create an Ubuntu virtual machine:

Note: If you'd like to find out more about virtual desktop solutions, check our guide to VDI environments.

STEP 1: Enable Virtualization in BIOS

Using Hyper-V requires virtualization enabled in the motherboard's BIOS. The exact steps of this process will vary depending on the model of your motherboard.

1. Open the BIOS by rebooting your computer and pressing the BIOS button (F1, F2, F10, F12, or Delete, depending on the motherboard model) when prompted.

2. The virtualization settings are located under the CPU or Advanced BIOS Settings category, depending on your system.

Note: The virtualization settings have different names on different systems. Look for items like Hyper-V, SVM, Vanderpool, VT-X, Intel Virtualization Technology, or AMD-V.

3. Once you enable the appropriate settings, use the Save and Exit option to confirm the changes.

STEP 2: Enable Hyper-V

Before setting up the virtual machine, you need to enable Hyper-V in Windows settings:

1. Open the Windows Start menu, and select the Settings window.

2. Click the Apps tile to open application settings.

Open the application settings in the Control Panel

3. On the right-hand side, click the Programs and Features link.

Click the Programs and Features link

4. In the Programs and Features window, click the Turn Windows features on or off link on the left-hand side.

Click the Turn Windows features on or off link

5. Scroll down and check the Hyper-V option, along with the Hyper-V Management Tools and Hyper-V Platform sub-options.

Check the Hyper-V option

6. Click OK to confirm the changes.

7. Restart your computer.

STEP 3: Create a Virtual Switch

After enabling Hyper-V, create a virtual network switch for the virtual machine to use:

1. In the Start menu, navigate to the Windows Administrative Tools folder and open Hyper-V Manager.

2. Right-click on the name of your system on the left-hand side of the Hyper-V Manager window. Select the Virtual Switch Manager option from the drop-down menu.

Open the Virtual Switch Manager to create a new virtual switch

3. In the Virtual Switch Manager window, select the New virtual network switch option on the left-hand side. Set the virtual switch type to External and click Create Virtual Switch.

Create an external virtual switch

4.  Enter a name for the new virtual switch. In this example, we will be using Ubuntu 20.04. Click OK to finish setting up the virtual switch.

Name the new virtual switch and click OK

5. A new window might appear prompting you to apply network changes. Click Yes to confirm.

Confirm the new network changes

STEP 4: Install Ubuntu 20.04

Hyper-V offers two options when creating a new virtual machine:

  1. The Quick Create option lets you use a wizard to automatically download an operating system and install it on a virtual machine.
  2. You can also manually set up a new virtual machine and install an operating system from your hard drive or external media.

We will go over the process of installing Ubuntu 20.04 using both options:

Quick Create

1. In the Action drop-down menu, click Quick Create to start the quick create wizard.

Click Quick Create to start the quick create wizard

2. On the left-hand side, select Ubuntu 20.04 from the list of operating systems.

3. Click More options to set up a name for the new virtual machine and select the Ubuntu 20.04 virtual switch in the Network menu.

Select the OS to install on the new virtual machine

3. Click Create Virtual Machine to start the setup process. Hyper-V will automatically download and install Ubuntu.

Create a new virtual machine

4. Once the installation is done, use the Connect button to start up your virtual machine or the Edit settings… button to change settings.

Manually

1. Before you start setting up a new virtual machine, download the Ubuntu 20.04 installation image from the official Ubuntu website.

2. In the Action drop-down menu, select New and click Virtual Machine.

Starting the manual setup for a new virtual machine

3. In the New Virtual Machine Wizard, click Next to start setting up the new virtual machine.

4. Choose a name and install location for the new virtual machine, then click Next to proceed.

Set the name and location for the new virtual machine

5. Choose the generation for the new virtual machine, then click Next.

Choose the virtual machine generation

Note: Learn the difference between type 1 and type 2 hypervisors in our article What is a Hypervisor.

6. Assign the amount of memory to allocate to the virtual machine. Use at least 2 GB of memory and enable the use of dynamic memory. Click Next to continue.

Set virtual machine memory

7. Choose Ubuntu 20.04 as the virtual network switch, then click Next.

Configure virtual machine network connection

8. Use the Create a virtual hard disk option to create a new hard disk for the virtual machine. Assign at least 20 GB of hard disk space and click Next to continue.

Set virtual machine hard disk space

9. Under the Install an operating system from a bootable CD/DVD-ROM option, choose Image file (.iso) and select the Ubuntu image you downloaded previously. Click Next to continue.

Select an image to install the new operating system from

10. The final step offers a summary of the new virtual machine setup. Click Previous to make any changes or click Finish to create the virtual machine.

Click Finish to complete setting up the virtual machine, or Previous to edit any of the settings you made

STEP 5: Start the Virtual Machine

The new virtual machine appears in the Hyper-V Manager window. Right-click on the virtual machine name and click Connect to start it up.

Click Connect to start the new virtual machine

Conclusion

After following this tutorial, you should have Hyper-V enabled, and a new virtual machine with Ubuntu 20.04 installed and ready to use.

Was this article helpful?
YesNo
Aleksandar Kovačević
With a background in both design and writing, Aleksandar Kovacevic aims to bring a fresh perspective to writing for IT, making complicated concepts easy to understand and approach.
Next you should read
Virtualbox vs VMware: Head-to-Head Comparison
February 9, 2021

VirtualBox and VMware are two of the most popular virtualization platforms that allow you to run multiple virtual machines on a single server. Learn about how they differ and which one is best for you in this head-to-head...
Read more
How to Install VirtualBox on Ubuntu
June 2, 2019

VirtualBox is a powerful tool for running a virtual operating system on your computer. In this tutorial learn how to install VirtualBox on Ubuntu 18.04.
Read more
What is Server Virtualization? Definition and How it Works
February 24, 2019

A virtualized server allows one piece of hardware to be used as multiple virtual servers. Learn about Server Virtualization, the types, & benefits.
Read more
How to Install VMware Workstation on Ubuntu
April 10, 2019

This easy tutorial shows you how to install VMware Workstation Pro on Ubuntu. Running a virtual machine (VM) on a personal computer has never been easier. With the help of a hypervisor, one server can share its resources...
Read more