Run Ubuntu Within Windows Using VirtualBox

01
of 05

Install Oracle VirtualBox

Oracle VirtualBox Installation
Oracle VirtualBox Installation Steps 1 To 4.

Windows users looking to use Linux for the first time will find it beneficial to try it out in a virtual machine. There is plenty of great virtual machine software available on the market.

The pros for installing Linux in a virtual machine include:

  • The ability to try a version of Linux without affecting the Windows host machine
  • The virtual Linux operating system will perform the same way as it would when installed to the physical hard drive
  • Software installed into the virtual machine remains intact and can be used even after a reboot.
  • The virtual machines can be backed up and restored easily so if you mess up it isn't so much of an issue

For this guide, I have chosen Ubuntu as it is one of the most popular and easy to use Linux distributions.

In order to follow this guide, you will need to download Ubuntu (either 32-bit or 64-bit depending on your machine)  and Virtualbox.

If you are using Windows 10 you would be better off following this guide to running Ubuntu within Windows 10.

Install VirtualBox

Navigate to the downloads folder on your computer and double click on the VirtualBox installer.

The Welcome Screen

The first screen is a welcome screen.

Click "Next" to move on.

Choose Components

You will now be asked which components you wish to install. I recommend leaving the default options selected.

Click "Next" to get to the "Custom Setup" screen.

Choose Windows Start Folder

Choose which folder you want VirtualBox to appear in within the Windows menu structure.

Click "Next"

Create Desktop Shortcut

At this point you can choose whether to create a desktop shortcut or not.

Clicking "Next" takes you to the "Network Warning" screen.

Install VirtualBox

You are now ready to install Oracle VirtualBox.

Click "Install" to start the installation.

Accept All Warning

During the installation, you may be asked for permission to install the application and your antivirus and firewall software may request permission to install VirtualBox.

Start VirtualBox

When the installation has finished you can run Oracle Virtualbox by leaving the "Start Oracle VM VirtualBox after Installation" checkbox checked.

Click "Finish" to complete the installation.

If you left all the default options checked during installation you will also be able to run VirtualBox by clicking the desktop icon.

Oracle VirtualBox works on all versions of Microsoft Windows from Windows XP upwards including Windows 8.

02
of 05

Create A Virtual Machine

Create VirtualBox Virtual Machine
Create VirtualBox Virtual Machine Steps 1 To 3.

Oracle VirtualBox has a lot of options and it is worth exploring all of these and reading the help guide but for the sake of this tutorial click on the "New" icon on the toolbar.

The first thing you need to do is define the type of Virtual Machine you wish to create.

  • Enter a descriptive name into the "Name" box
  • Select Linux as the "Type"
  • Choose Ubuntu as the "Version".
  • Click "Next" to continue.

Note: Make sure you choose the correct version. You must choose 32-bit if your host computer is a 32-bit machine. If you are using a 64-bit machine you can choose either 32-bit or 64-bit but obviously 64-bit is recommended

Allocate Memory To The Virtual Machine

The next screen asks you to set how much memory you wish to give over to the virtual machine.

You should not go below the minimum specified and you should also make sure you leave enough memory for the host operating system (Windows) to keep running.

512 megabytes will run fairly sluggishly and if you have enough memory I recommend increasing the bar to 2048 megabytes.

Create A Virtual Hard Drive

The next three steps are all about allocating disk space to the Virtual Machine.

If you want to run Ubuntu as a live image then you do not need to create a hard drive at all but for installing Ubuntu you will need to.

  • Select "Create a virtual hard drive now"
  • Click "Create"

You will now be asked to select the type of hard drive to create. There is little point in choosing anything other than the default "VDI" file type as this is the one native to VirtualBox.

  • Select "VDI"
  • Click "Next".

When deciding on the way the hard drive is created you can choose to opt for a fixed size hard drive or a dynamically sized hard drive.

It is important to note at this point that no partitioning occurs on your actual hard drive. All that happens is that a file is created on your computer which acts as the hard drive.

A fixed sized disk creates the hard drive to be the maximum size you define straight away whereas a dynamically sized disk adds space to the file as it is required up to the maximum size that you specify.

A fixed sized disk performs better because as you install software within the virtual machine it doesn't have to increase the file size on the fly. If you have enough disk space then I recommend this option.

  • Select your desired hard drive type
  • Click "Next"

After specifying the hard drive type and the way the disk is allocated you are asked to specify how much disk space you are going to give over to the Ubuntu Virtual Machine.

Do not go below the minimum set and create enough disk space to make it worthwhile. I recommend at least 15 gigabytes.

  • Choose where you wish to save the virtual machine
  • Specify the disk size
  • Click "Create"

Start The Virtual Machine

The Virtual Machine has now been created and you can start it by pressing the "Start" button on the toolbar.

The first boot requires you to select a start up disk.

  • Press the folder icon
  • Navigate to the downloads folder and select the Ubuntu ISO
  • Click "Start"
03
of 05

Install Ubuntu Within VirtualBox

Install Ubuntu in a Virtual Machine
Install Ubuntu in a Virtual Machine steps 1 to 2.

Ubuntu will now boot into a live version of the operating system and a welcome message will appear.

You will be asked to select your language and you will be able to choose whether to try Ubuntu or Install Ubuntu.

If you decide to try Ubuntu first you can always run the installer by double clicking on the "Install" icon on the Ubuntu desktop.

Choose Your Installation Language

Now we are into the nitty gritty of installing Ubuntu.

The first step is to choose the installation language.

  • Choose a language
  • Click "Continue"

Pre-requisites

A screen will appear showing how prepared you are for installing Ubuntu.

Make sure that if you are using a laptop that your computer is either plugged in or has enough battery life. I recommend you connect to a power source especially if you plan on installing updates as you go.

There are two checkboxes at the bottom of the screen.

  1. Choose whether to install updates as you go
  2. Choose whether to install 3rd party software

If you have a fast enough internet connection it is worth updating as you go but if you don't I would recommend installing Ubuntu and updating later.

I would also recommend not installing the 3rd party software at this stage. This can be done post installation.

Click "Continue".

04
of 05

Partitioning A Virtual Hard Drive

Install Ubuntu as a virtual machine
Install Ubuntu as a virtual machine steps 5 to 6.

The "Installation Type" screen asks you how you wish to partition the hard drive.

When installing on a real hard drive this step causes people anguish. Do not panic though as this will only touch your virtual hard drive and will not affect Windows in any way whatsoever.

  • Select "Erase disk and install Ubuntu"
  • Click "Install Now"

The installation will now begin and the files will be copied across to the virtual hard drive.

Choose Your Locations

Whilst this is going on you will be asked to choose your location. This sets the timezone for Ubuntu and makes sure the all important clock shows the right value.

  • Click on the map to choose your location
  • Click "Continue"

Choose Your Keyboard Layout

A final couple of steps require you to choose your keyboard layout and create a user.

  • Choose the language for your keyboard
  • Choose the type of keyboard
  • Click "Continue".

Create A User

From the "Who are you" screen:

  • Enter your name
  • Choose a name for your virtual machine
  • Enter a username
  • Add a password and repeat the password
  • Choose whether you want to log in automatically or require a login
  • Choose whether to encrypt the home folder
  • Click "Continue".

Completing The Installation

The final stage is to wait for the files to finish copying and the installation to complete.

When the process is complete you will be asked to reboot. This, of course, refers to the virtual machine and not your host Windows machine.

You can reboot in a number of ways such as clicking the little icon in the top right corner of Ubuntu and choosing to restart or by using the reset option from the VirtualBox menu.

05
of 05

Install Guest Additions

Ubuntu Guest Additions
Install Ubuntu Guest Additions.

Install Guest Additions

You will notice that if you choose to view Ubuntu in full-screen mode that it doesn't necessarily scale correctly.

To get the best experience possible you will need to install "Guest Additions".

This is a simple process and just requires you to select "Devices" and "Install Guest Additions" from the menu while running the virtual machine.

A terminal window will open and commands will run and when it has completed you will need to restart the virtual machine again.

Ubuntu is now good to go.

At this point, you would probably like to know what to do next. Further guides are coming up shortly showing how to do basic things in Ubuntu, how to run from a live USB drive and ultimately how to install Ubuntu to your actual hard drive.

There are also articles coming up to help make that all important decision about which distribution to use.

Bookmark this page or choose to follow me using the social media buttons on the left-hand side.