How to Set Up a Ubuntu Virtual Machine on Windows

How to Set Up a Ubuntu Virtual Machine on Windows

What Do I Need?

  • Windows 10
  • Ubuntu
  • Hyper-V

What is Hyper-V?

Hyper-V is the native hyper-virtualization environment within Microsoft Windows 10. It’s been around for a long time and is secure and capable. Hyper-V lets you run multiple operating systems as virtual machines on Windows. Specifically, it provides hardware virtualization. That means each virtual machine runs on virtual hardware. You can create virtual hard drives, virtual switches, and a number of other virtual devices, all of which can be added to virtual machines.

  1. Install Hyper-V
    1. Open ‘Control Panel’.
    2. Click ‘Programs and Features’.
    3. Click ‘Turn Windows features on or off’.
    4. Click to enable ‘Hyper-V’,
      • ‘Hyper-V Management’
      • ‘Hyper-V Platform’

      How to Setup a Ubuntu Virtual Machine on Windows

      • Click ‘OK’.
      • Restart the computer.

  1. Create a Virtual Machine
    1. Open ‘Hyper-V Manager’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Next, click ‘Quick Create’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Select ‘Ubuntu 20.04.1 LTS’.
    2. Click ‘More options’.
    3. Change the name from the default where it says ‘name’. I’d recommend changing the name as it’ll help to find the virtual machine if you’ve been creating a lot of them.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Create Virtual Machine’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Dependent on the speed of your computer it could take a while to finish building your new virtual machine.
  1. Configure your Ubuntu Virtual Machine

    How to Setup a Ubuntu Virtual Machine on Windows
    1. Click ‘Connect’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Start’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Press ‘enter’.
    2. After about 2-4 minutes the basic installation will complete and you’ll see the next dialog.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Continue’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Continue’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Select your location and click ‘Continue’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Complete the required details and then click ‘Continue’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Wait for the installation to complete.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Skip’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Click ‘Next’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. Select ‘No, don’t send system info’.
    2. Click ‘Next’.
    3. And then, finally, click ‘Done’.

    How to Setup a Ubuntu Virtual Machine on Windows

    1. You now have a fully functional and operational Ubuntu virtual machine running, virtualized on your computer.

  1. Power Down Virtual Machine

To turn off your virtual machine properly, in other words, in a way that won’t cause problems later on when you need the machine to do your bidding, click the power icon in the top right of your desktop and select ‘Power Off’.


How to Setup a Ubuntu Virtual Machine on Windows

Next Steps

Next, you should ensure that your virtualized machine is completely up to date and secure, especially if you’re using it for mission critical or development projects. To update your machine, use the following command:

sudo apt-get upgrades && apt-get update

Running that command performs a full upgrade and update of all of your virtualized operating system and components. If you experience problems with the internet or network connectivity, check to make sure that your virtual machine is using a virtual switch connection that’s sharing your host computer’s connection.

Conclusion

Congratulations, you now know how to build a virtual machine on your host computer. You can use this for a whole host of applications. For example, I use a number of virtualized machines for computer vision experiments.

So why do we virtualize hardware? Virtualization allows you to:

  • Run software that requires older versions of Windows or non-Windows operating systems.
  • Experiment with other operating systems. Hyper-V makes it very easy to create and remove different operating systems.
  • Test software on multiple operating systems using multiple virtual machines. With Hyper-V, you can run them all on a single desktop or laptop computer. These virtual machines can be exported and then imported into any other Hyper-V system, including Azure.

Most computers run Hyper-V; however, each virtual machine runs a completely separate operating system. You can generally run one or more virtual machines on a computer with 4GB of RAM, though you’ll need more resources for additional virtual machines or to install and run resource-intensive software like games, video editing, and engineering design software.

Hyper-V on Windows supports many different operating systems in a virtual machine, including various releases of Linux, FreeBSD, and Windows. As a reminder, you’ll need to have a valid license for any operating systems you use in the VMs.

 

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install the Django Web Framework on a Ubuntu 22.04 VPS

Brief description When building a website, similar components are required, and
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How To Change the Hostname on an Ubuntu 18.04 VPS or Dedicated Server

Ubuntu 18.04 has been described as awesome by Mark Shuttleworth
3 min read
Vladimir Rakov
Vladimir Rakov
Hosting Expert

How to Add Swap Space on Your Ubuntu 16.04 Server

Step 1: First of all you need to see if there is some swap space availab
5 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top