How-to: Setup Ubuntu in VirtualBox
Windows and Mac OS X are powerful operating systems. However, sometimes they just doesn’t cut it. Maybe you need to work with a Linux based OS, or maybe you just want to use a simpler OS. Whatever your reason, using multiple operating systems can be a powerful way to compute. A popular way to achieve this, is by setting up a dual-boot system, which gives you the capability to boot to different operating systems. Even so, this method has its drawbacks, primarily when you need to switch between operating systems quickly. What if you could run multiple operating systems in unison? This is exactly the objective of VirtualBox, a free virtualization software created by Oracle. VirtualBox allows you to run almost any OS directly on top of your host OS.
This tutorial will show you how to set up and run Ubuntu, a popular distribution of Linux, in VirtualBox. This same general process can be applied to install many other operating systems in VirtualBox as well. I will be using Windows 7 as my host operating system throughout this tutorial. If you are using a different host operating system, the process might be slightly different.
The first thing you must do is download and install the most recent version of VirtualBox from here. Once have you have completed the installation, run the Oracle VM VirtualBox application.
Next, you need to download the Ubuntu operating system from here. Make sure to download the 32 bit version, even if your computer is 64 bit.
Once you have the .iso file downloaded, reopen VirtualBox and click the “New” button. In the window that pops up, set the name to “Ubuntu”, the type to “Linux”, and the version to “Ubuntu (32 bit)”. Then, click “Next” to continue.
The next window will prompt you for the amount of RAM to allow Ubuntu to use. In order to run Ubuntu properly, you must give it at least 1gb of RAM. However, the Virtual Machine could run better if you give it more. Just remember to retain at least 2gb of RAM for your host operating system. I have 8gb of RAM, so I decided to give it 2gb by setting the slider to 2048mb (there are 1024mb in 1gb). When you have set the amount of RAM to give the Virtual Machine, click “Next” to proceed.
On the next window, leave the selection at “Create a virtual hard drive now” and hit “Create” to set up a virtual hard drive. Leave the selection at “VDI (VirtualBox Disc Image)” on the window that pops up and then click “Next”. The next window gives you two options for virtual hard drive types. A “Dynamically allocated” hard drive will be just that, dynamically allocated. This means the VDI file that will be created on your host system will grow as the disc space is needed by the Virtual Machine. A “Fixed size” hard drive will always be the size you specify, whether the Virtual Machine is using that space or not. A fixed hard drive will be a tiny bit faster, but will take more space up on your host system. A dynamic hard drive, on the other hand, will not take up more space until you need it, but will be slightly slower. I would recommend choosing the “Dynamically allocated” option. Once you have selected, click “Next”.
Now, select the name of the VDI file to be stored on your host system and the amount of storage to give Ubuntu. If you selected a dynamically allocated hard drive you can always change the amount of storage later. Once you are done, click “Create” to create your virtual hard drive. Now you are ready to launch Ubuntu in VirtualBox for the first time!
To run the Virtual Machine, make sure it is selected, and then click “Start” at the top. Two new windows will pop up, the top one prompting you to “Select start-up disc”. Click the browse button, and find and select the Ubuntu .iso file you downloaded earlier. Then click “Start”.
If all has gone well, Ubuntu should boot up in the window and an install window will pop up with two options. You can either try Ubuntu or install Ubuntu. In this case we want to install Ubuntu, so click the “Install Ubuntu” button.
On the next window you can choose if you want to download updates and/or third party software with your installation. After you have made your selections, proceed to the next window. Leave the “Erase disc and install Ubuntu” option selection. As you continue through the installation you will be prompted for your location and to create an Ubuntu account. Once you have Ubuntu installed you can shut down the Virtual Machine by closing the window, which will prompt you whether to save the current state or shut down.
That’s it (mostly). You’ve successfully set up Ubuntu in VirtualBox and can run it on top of your host operating system! Visit the official Ubuntu site for information on how to get started. Also, stay tuned for my next tutorial on how to install “Guest Additions” in order to make your Virtual Machine experience much better. If you’re having problems, make sure to leave a comment and I can help you troubleshoot.
© 2014, Andrew Thomas. All rights reserved.