- How to create a Linux virtual machine on Windows 10 using Hyper-V
- Guide requirements
- How to enable Hyper-V on Windows 10
- Verifying Hyper-V support
- Enabling Hyper-V
- How to create a virtual machine using Hyper-V
- Creating a virtual switch
- Creating a virtual machine
- How to install Ubuntu Linux using Hyper-V on Windows 10
- More Windows 10 resources
- Halo: MCC’s live service elements make it better, not worse
- Microsoft’s Surface Duo is not ‘failing up’
- Here’s what you can do if Windows 10 update KB5001330 is causing issues
- These are the best PC sticks when you’re on the move
- What is a Virtual Machine And How to Setup a VM on Windows, Linux, and Mac
- Beau Carnes
- Virtual Machine Programs
- Setting up a Virtual Machine (VirtualBox)
- Beau Carnes
How to create a Linux virtual machine on Windows 10 using Hyper-V
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:
- Open Start.
- Search for Command Prompt and click the top result.
Type the following command and press Enter:
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:
- Open Control Panel.
- Click on Programs.
Click on Turn Windows features on or off.
Click OK to begin the process.
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:
- Open Start.
- Search for Hyper-V Manager and click the top result.
- Click on the Action menu.
Select New and click on Virtual Switch Manager.
Click the Create Virtual Switch button.
Click OK.
Creating a virtual machine
After creating the virtual switch, you can proceed to create a new virtual machine:
- Open Start.
- Search for Hyper-V Manager and click the top result.
- Click on the Action menu.
Select New and click on Virtual Machine.
Enter a descriptive name for your virtual machine (e.g., vm-ubuntu).
Click Next.
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.
Click Next.
Click Next.
Click Next to continue.
Click Next.
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.
On Hyper-V Manager, under Virtual Machine, right-click the newly created device, and select Connect.
Click the Start (power) button.
Click the Install Ubuntu button.
Click Continue.
Click Continue.
Double-click the /dev/sda drive.
Double-click free space.
Click OK.
Double-click free space again.
Click OK.
Click the Install Now button.
Click Continue.
Click Continue.
Click Continue.
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:
Halo: MCC’s live service elements make it better, not worse
Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.
Microsoft’s Surface Duo is not ‘failing up’
Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.
Here’s what you can do if Windows 10 update KB5001330 is causing issues
In this guide, we’ll show you the steps to get rid of the update KB5001330 to fix profile, gaming, and BSoD problems with the Windows 10 October 2020 Update and May 2020 Update.
These are the best PC sticks when you’re on the move
Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!
What is a Virtual Machine And How to Setup a VM on Windows, Linux, and Mac
Beau Carnes
A virtual machine is a program you run on a computer that acts like it is a separate computer. It is basically a way to create a computer within a computer.
A virtual machine runs in a window on the host computer and gives a user the same experience they would have if they were using a completely different computer. Virtual machines are sandboxed from the host computer. This means that nothing that runs on the virtual machine can impact the host computer.
Virtual machines are often used for running software on operating systems that software wasn’t originally intended for. For instance, if you are using a Mac computer you can run Windows programs inside a Windows virtual machine on the Mac computer. Virtual machines are also used to quickly set up software with an image, access virus-infected data, and test other operating systems.
A single physical computer can run multiple virtual machines at the same time. Often a server will use a program called a hypervisor to manage multiple virtual machines that are running at the same time. Virtual machines have virtual hardware, including CPUs, memory, hard drives, and more. Each piece of virtual hardware is mapped to real hardware on the host computer.
There are a few drawbacks with virtual machines. Since hardware resources are indirect, they are not as efficient as a physical computer. Also, when many virtual machines are running at the same time on a single computer, performance can become unstable.
Virtual Machine Programs
There are many different virtual machine programs you can use. Some options are VirtualBox (Windows, Linux, Mac OS X), VMware Player (Windows, Linux), VMware Fusion (Mac OS X) and Parallels Desktop (Mac OS X).
VirtualBox is one of the most popular virtual machine programs since it is free, open source, and available on all the popular operating systems. We’ll show you how to set up a virtual machine using VirtualBox.
Setting up a Virtual Machine (VirtualBox)
VirtualBox is an open source Virtual Machine program from Oracle. It allows users to virtually install many operating systems on virtual drives, including Windows, BSD, Linux, Solaris, and more.
Since VirtualBox runs on Windows, Linux, and Mac, the process for setting up a virtual machine is pretty much the same in each operating system.
Start with downloading and installing VirtualBox. You can download it at this link: VirtualBox Downloads
You will also need to download an .iso file for the operating system that you want to run in your virtual machine. For instance, you can download a Windows 10 .iso file here: https://www.microsoft.com/en-us/software-download/windows10ISO
Once you have VirtualBox running, click the «New» button
Create a new virtual machine.
Next you will have to choose which OS you plan on installing. In the «Name» box, type the name of the OS you want to install. VirtualBox will guess the type and version based on the name you type in, but you can change these settings if you need to.
Configure the virtual machine.
The wizard will automatically select default settings based on the OS type and version you selected. You can always change the settings as you go through the wizard. Just keep clicking «Continue» and «Create» until you get through the wizard. It’s usually fine to use the defaults.
Next, start the virtual machine you just created by clicking «Start».
Start the virtual machine.
Once the virtual machine starts up, select the .iso image file you want to use.
Install the operating system on the virtual machine.
Your virtual machine will now load your selected operating system. The operating system may require some setup, but it will be the same setup that would be required if you had installed it on a standard computer.
Windows 10 is successfully running inside a virtual machine.
Congratulations! You’ve run your first Virtual Machine in VirtualBox.
Beau Carnes
I’m a teacher and developer with freeCodeCamp.org. I run the freeCodeCamp.org YouTube channel.
If you read this far, tweet to the author to show them you care. Tweet a thanks
Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started
freeCodeCamp is a donor-supported tax-exempt 501(c)(3) nonprofit organization (United States Federal Tax Identification Number: 82-0779546)
Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons — all freely available to the public. We also have thousands of freeCodeCamp study groups around the world.
Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, and staff.