Click here to Skip to main content
15,792,771 members
Articles / Operating Systems / Linux

Run Linux in Microsoft Windows in a VirtualBox

Rate me:
Please Sign up or sign in to vote.
4.67/5 (13 votes)
11 Feb 2012CPOL9 min read 68.3K   16   18
This article is a study note on installing Linux in Microsoft Windows in a VirtualBox. I hope that it may be of some help to those who are interested in this topic.


This article is a study note on installing Linux in Microsoft Windows in a VirtualBox. I hope that it may be of some help to people who are interested in this topic.


Back in school, I worked on UNIX quite extensively in my course projects. But I have never had my own UNIX system. In terms of Linux, I am a beginner. But I have always been thinking of having a Linux computer. Recently I revisited this subject and went to a couple of forums and web sites to learn Linux. I did not want to invest a dedicated computer on Linux, and I did not want to get into the complexity related to the dual boot system. After some research I noticed the VirtualBox. I found it an ideal tool for beginners to get started. The Linux installation on a VirtualBox is simply a file in the host computer. If you mess up anything, you can simply remove it and give the whole process a complete, fresh re-start without any side effect on your host computer. Running Linux on a VirtualBox is quite easy and my experience is very pleasant, so I decided to keep a note, in case I forget about it. Hopefully this note can be of some help to the interested readers too.

What you need

In order to install and run Linux in a VirtualBox, I had the following two things in my hands:

  • A computer running Microsoft Windows. The computer that I used was a low-end computer. It was a three year old 32 bit Pentium(R) Dual-Core T4200 @ 2.00GHz laptop running Windows Vista Home Premium. It had 3GB memory and a 300GB hard drive. Considering the time and the price when I purchased it, most of the computers being used today are much more powerful than this one. I also had a reasonably fast internet access to download the required software.
  • A writable CD. I created a Linux installation CD using it. If you have a USB drive, you do not need a CD. You can simply use your USB drive.
The VirtualBox runs on multiple operating systems. Since I only have a Windows laptop, all my learning is on Windows. Now let us start to set up the system step by step.

Create a Linux CD

Before creating a Linux CD, you will need to decide which "Linux distro" you want to use. This link discusses some differences among the most popular Linux distributions. I personally have tried both Ubuntu and Mint. I feel that they are both good and pleasant to use. The choice is just a personal preference. In this study note, I will use Ubuntu as the example.

Download the Ubuntu Installation ISO

The first step to create a Linux CD is to download the ISO file. You can go to this link to download your desired ISO. The current Ubuntu distribution version is "11.10". The download page provides both the 32 bit version the 64 bit version. Since my computer is a 32 bit computer, I downloaded the 32 bit version. The ISO file for the 32 bit version is 695MB. Depending on the speed of your internet access, it may take you longer to download this file. Since Ubuntu maintains their web site nicely, you should not have much trouble to have the file fully downloaded with a moderately fast internet access. In my case, it took me about three minutes to download the ISO file.

Download and Install the ISO Recorder

This step is not absolutely necessary. The whole purpose of installing the ISO Recorder is to burn the downloaded ISO to a CD. According to Ubuntu, if you are using a Windows 7 computer, you should be able to use the Windows Disc Image Burner to create the installation CD. Since I used a Vista computer, I installed the ISO Recorder. The ISO Recorder supports both Vista and Windows 7, so even if you have Windows 7, you can still use it. It is your choice. The ISO Recorder has both 32 bit and 64 bit versions. You will need to choose the correct version that fits your computer. The downloaded file is an MSI file smaller than 1 MB. You can simply double click the file and follow the instructions on the installer to install it.

Burn the Linux CD

After the ISO Recorder is installed, you can right click on the Ubuntu ISO file and you will see the "Copy image to CD" option.


If you click on the "Copy image to CD" option, the ISO Recorder UI will show up to let you configure a few CD burning options.


In my case, I simply used the default option and clicked the "Next" button. Within half a minute, the Ubuntu CD was ready for me to use. What I need to point out is that the whole purpose of installing the ISO Recorder is to create a Linux installation CD. If you have other options, you do not have to use the ISO Recorder.

Now let us get started to set up the VirtualBox.

Download and Install VirtualBox

Download the VirtualBox

You can download the VirtualBox from this link. There are a couple of versions of VirtualBox for different platforms. You will need to choose the one that fits your computer. For a Windows computer, the current VritualBox version is "4.18" and the downloaded file is named as "VirtualBox-4.1.8-75467-Win.exe". Of course, by the time you read this article, you may see newer versions of VirtualBox and I will recommend you to use the newer versions.

Install the VirtualBox

If you double click on the "VirtualBox-4.1.8-75467-Win.exe" file, the VirtualBox installation wizard will be launched.


Click on the "Next" button, and we can change some of the installation options.


For simplicity, I chose to install everything coming with the downloaded package and started the installation. During the installation process, the installer will ask you if you want install a couple of software devices. Since the VirtualBox is from Oracle, I feel that it is a trusted company, so I chose to install all the software devices. These software devices may not be critical for this article. But they may be critical if you want to use certain advanced features once you become an expert on VirtualBox.

Install Linux on the VirtualBox

After the VirtualBox is installed, we can start to create a virtual machine and install Linux on it.

Create a Virtual Machine

To create a virtual machine, let us start the VirtualBox and click the "New" virtual machine button in the tool bar.


The new virtual machine template will show up to let us choose the configuration options of the virtual machine.


We will need to give the virtual machine a name and tell the VirtualBox what operating system will be running on the virtual machine. Click on the "Next" button, the template will ask you how much memory you want your host computer to allocate to the virtual machine.


Since my computer has only 3GB of memory, I only gave 1GB to the virtual machine. This memory allocation is not a permanent allocation. Once you shutdown the VirtualBox, your host computer will take the allocated memory back. The template will further guide you to create a virtual hard drive for the virtual machine. The virtual hard drive is simply a file on your host computer.


In the above screenshot, I chose to create the virtual hard drive on my desktop, and I specified its size to be 8GB. Click on the "Next" button and follow the rest of the instructions by the template to finish the creation of the virtual machine.

Install Linux on the Virtual Machine

To install the Linux operating system, we need to highlight our virtual machine and click the "Start" button on the tool bar to start it.


During the start up, we will be asked where to find the operating system for the virtual machine. We can then insert the Ubuntu CD created earlier in the CD drive and let the VirtualBox find the operating system in this CD.


After the Linux operating system is loaded, we will have two options. We can try the operating system from the CD without an installation. We can also install the operating system on the virtual hard drive.


Since we want better performance and functionality, we can click the "Install Ubuntu" button to start the installation process. Depending on the performance of the host computer, this installation can take a long time. On my computer, it took about 1/2 hour.


When the installation is about to finish, you will be prompted to enter some basic user information as shown in the picture. When you finish entering this information, you can click the "Continue" button and follow the rest of the installation instructions to finish the installation. When the installation completes, you will be instructed to remove the Linux CD and restart the virtual machine.

Run the First Application in Linux


After the virtual machine is restarted, we can test run some applications on Linux. The Ubuntu distribution has Firefox as the default installation. The above picture shows the VirtualBox home page in Firefox running in the Linux operating system in a VirtualBox hosted in Microsoft Windows. You can also try to run the VirtualBox in full screen mode, which will give you a much better user experience.

How about if I make any mistake?


If you make any mistakes when you install Linux, you can always come to a complete fresh restart. You can right click the virtual machine in the VirtualBox to remove your virtual machine and the virtual hard drive file completely.


This is my first time using Linux. My general impression with it is quite pleasant. It has a very easy to use graphical interface. After installing the operating system, it took me just a couple of minutes to download Google Chrome and run it in Linux. Although my dominant experience is on the Microsoft side, it took me just 1-2 hours of effort to install Java and Eclipse and write some simple Java programs. In terms of the VirtualBox, my experience with it is also very good. It is very simple to use and has all the functions that I need to host a virtual machine. If you have some time and if you are interested, I will recommend you to try both Linux and VirtualBox.

Points of Interest

  • This article is a study note on installing Linux in Microsoft Windows in a VirtualBox. I hope that it may be of some help to the people who are also interested in this topic.
  • The biggest advantage of running Linux in a VirtualBox is that you can always come to a complete restart without any side effect on your host computer. As a beginner, this can release a lot of your pressure.
  • All the software used here can be downloaded for free. If you like the products, you can make a donation through their web site to show your appreciation and to encourage them to make their products better.
  • I hope you like my postings and I hope this article can help you one way or the other.


  • First revision - 2/11/2012.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
I have been working in the IT industry for some time. It is still exciting and I am still learning. I am a happy and honest person, and I want to be your friend.

Comments and Discussions

GeneralGreat stuff Pin
Iam Rkn2-Nov-13 0:53
Iam Rkn2-Nov-13 0:53 
GeneralRe: Great stuff Pin
Dr. Song Li4-Nov-13 4:52
Dr. Song Li4-Nov-13 4:52 
QuestionInclude installation of "Guest Additions" Pin
H. Gohel14-Feb-12 16:51
H. Gohel14-Feb-12 16:51 
AnswerRe: Include installation of "Guest Additions" Pin
Dr. Song Li14-Feb-12 17:02
Dr. Song Li14-Feb-12 17:02 
GeneralRe: Include installation of "Guest Additions" Pin
H. Gohel14-Feb-12 17:17
H. Gohel14-Feb-12 17:17 
GeneralRe: Include installation of "Guest Additions" Pin
Dr. Song Li14-Feb-12 17:51
Dr. Song Li14-Feb-12 17:51 
Suggestionvirtual box Pin
Member 770814914-Feb-12 3:56
Member 770814914-Feb-12 3:56 
GeneralRe: virtual box Pin
Dr. Song Li14-Feb-12 4:24
Dr. Song Li14-Feb-12 4:24 
GeneralMy vote of 5 Pin
Dr Bob13-Feb-12 9:40
Dr Bob13-Feb-12 9:40 
Thanks! Not everyone knows of the Oracle tool.
GeneralMy vote of 1 Pin
encodedpr13-Feb-12 7:16
encodedpr13-Feb-12 7:16 
GeneralMy vote of 4 Pin
Petr Kohout12-Feb-12 14:40
Petr Kohout12-Feb-12 14:40 
GeneralMy vote of 1 Pin
Paul3212-Feb-12 0:31
Paul3212-Feb-12 0:31 
GeneralRe: My vote of 1 Pin
Dr. Song Li12-Feb-12 3:55
Dr. Song Li12-Feb-12 3:55 
QuestionVM's can install from the ISO Pin
J4$PER11-Feb-12 23:18
J4$PER11-Feb-12 23:18 
AnswerMessage Closed Pin
12-Feb-12 2:48
professionalMirzakhmet Syzdykov12-Feb-12 2:48 
GeneralRe: VM's can install from the ISO Pin
Dr. Song Li12-Feb-12 3:52
Dr. Song Li12-Feb-12 3:52 
GeneralRe: VM's can install from the ISO Pin
Dr. Song Li12-Feb-12 3:58
Dr. Song Li12-Feb-12 3:58 
GeneralMy vote of 4 Pin
Fardan11-Feb-12 22:03
Fardan11-Feb-12 22:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.