Run Ubuntu Within Windows Using VirtualBox

Create an Ubuntu virtual machine on Windows 10

If you want to try Linux without installing Ubuntu on your Windows PC, you can set up an Ubuntu virtual machine. Here's how to run Ubuntu in the VirtualBox virtual machine software.

Instructions in this article apply to Windows 10, 8, 7, Vista, and XP.

Why Use an Ubuntu Virtual Machine?

Installing Ubuntu in a virtual machine allows you to try the version of Linux without affecting Windows. The virtual Linux operating system will perform the same way as it would when installed to the physical hard drive, and any software installed in the virtual machine remains intact after rebooting. Virtual machines can be easily backed up and restored, so it's no big deal if you mess something up.

How to Set Up an Ubuntu VM

To set up your Ubuntu virtual machine:

  1. Download VirtualBox for Windows and install it on your PC using the default settings.

    Download VirtualBox for Windows
  2. Download the Ubuntu ISO file you want to install from the Ubuntu download page.

    The Ubuntu download page.
  3. Launch VirtualBox and select New in the toolbar.

    Launch VirtualBox and select New in the toolbar.
  4. Give your VM a name, choose Linux as the Type, then choose Ubuntu as the Version and select Next.

    Give your VM a name, choose Linux as the Type, then choose Ubuntu as the Version and select Next.

    Make sure you choose the correct version of Ubuntu (32-bit or 64-bit) for your computer. Check the Control Panel to tell if you're running the 32-bit or 64-bit version of Windows.

  5. Choose how much memory (RAM) you want the virtual machine use and select Next.

    Choose how much memory (RAM) you want the virtual machine use and select Next.

    You should not go below the recommended minimum specified. If you have enough memory, we recommend increasing the bar to 2048 MB.

  6. Choose Create a virtual hard drive now and select Create.

    Choose Create a virtual hard drive now and select Create.

    If you just want to run Ubuntu as a live image, choose Do not add a virtual hard disk. To save changes you make in Ubuntu, you must create a virtual hard drive.

  7. Choose VDI (VirtualBox Disk Image) and select Next.

    Choose VDI (VirtualBox Disk Image) and select Next.
  8. Choose Dynamically allocated or Fixed size for the storage type and select Next.

    Choose Dynamically allocated or Fixed size for the storage type and select Next.

    A fixed size disk performs better because the virtual machine doesn't have to increase the file size as you install software.

  9. Specify how much disk space you are going to give over to the Ubuntu Virtual Machine and select Create.

    Specify how much disk space you are going to give over to the Ubuntu Virtual Machine and select Create.

    This step determines how much room you have for installing and running Linux programs, so we recommend at least 15 gigabytes.

    This step doesn't actually partition your Windows hard drive. Instead, a file is created, which acts as a virtual hard drive for Linux.

  10. The name of your virtual machine will now appear on the left side of the VirtualBox manager. Select Start in the toolbar to launch your VM.

    Select Start in the toolbar to launch your VM.
  11. Choose the Ubuntu ISO file you downloaded (the VM may automatically detect it) as the startup disk and select Start.

    Choose the Ubuntu ISO file and select Start.
  12. Your VM will now boot into a live version of Ubuntu. Choose your language and select Try Ubuntu or Install Ubuntu.

    Choose your language and select Try Ubuntu or Install Ubuntu.

If you decide to try Ubuntu for now, you can run the installer by double-clicking Install Ubuntu on the desktop.

Installing Ubuntu on your PC is a straight-forward process. Follow the on-screen prompts to download the necessary updates and third-party software. On the Installation Type screen, select Erase disk and install Ubuntu and select Install Now.

On the Installation Type screen, select Erase disk and install Ubuntu and select Install Now.

How to Install Guest Additions

After restarting your VM and booting into the Ubuntu desktop, you may notice that it doesn't scale correctly if you choose to view in full-screen mode. You can fix this problem by installing an add-on called Guest Additions.

Select Devices > Install Guest Additions from the VirtualBox menu while running the virtual machine. A terminal window will open and commands will run. When it has completed, you will need to restart the virtual machine again.

Ubuntu Guest Additions installing on a virtual machine