Articles Comments

Free Cookies » Tutorials » Running Ubuntu Linux In Windows XP Using Sun VirtualBox

Running Ubuntu Linux In Windows XP Using Sun VirtualBox

Perhaps the safest and most comfortable way for a Windows user to try Linux is by running it inside a virtual machine. A virtual machine is essentially a software-driven emulated personal computer. In other words, it’s like having a virtual PC inside your real PC so you can experiment with the virtual PC as much as you like without damaging your real PC.

So how do you get a virtual machine on your PC without paying thousands of dollars for a sophisticated virtual machine package?

Download and install Sun VirtualBox from http://www.virtualbox.org/. It’s free, easy to use, and offers various virtual machine configurations for running operating systems such as Solaris, Linux, BSD, OS/2, or Windows.

As can be seen by the following screenshots (click on them for larger views) the installation of VirtualBox requires that you temporarily disconnect from the Internet while it installs its own virtual network adapters and network drivers (which are safe to install even though they haven’t passed the Windows Logo testing policy).

When you run VirtualBox for the first time it’ll ask you to register a Sun Microsystems account. You don’t need to do this, but since I have one I’m just going to go ahead and sign in.

The welcome screen is usually friendly and helpful.

The next step is to download a Linux operating system. Since this tutorital focuses on running Ubuntu Linux in Windows XP using VirtualBox we’re going to visit the Ubuntu website (http://www.ubuntu.com/) and download an ISO (a CD-ROM file) of the latest version of the Ubuntu distribution of the Linux operating system (or simply Ubuntu Linux). Please be aware that CD-ROM files are usually as big as an actual CD-ROM (about 700MB in size) so be prepared for a long and large download!

Now that you have the Ubuntu Linux ISO downloaded you’ll need to switch to Sun VirtualBox and click on “New” to start the New Virtual Machine Wizard which will guide you in creating a new virtual machine.

Give your new virtual machine a name and allocate memory to it. We’ll start off with 256MB of memory.

Now we’ll need to create a virtual hard disk for our virtual machine. I highly recommend creating a dynamically expanding hard disk of around 8GB.

And there you go! You’ve now created your first virtual machine in VirtualBox! The next step is to click on “Settings” so you can configure your virtual machine. Select the “CD/DVD-ROM” panel of the settings dialog window and choose “ISO Image File” as shown below.

Click on the small yellow folder icon with the little green arrow to reach the next screen.

This is where your bootable CD/DVD media is usually listed, but you haven’t added yours to the list yet so click on “Add” and select the Ubuntu Linux ISO file that you had downloaded earlier from the Ubuntu website.

Once selected your Ubuntu Linux CD will appear in the list as shown below.

Click “Select” to select your Ubuntu Linux CD and to return to the settings dialog box.

Now choose the “System” panel and, just for fun, set the base memory to 128MB as shown in the below screenshot.

Click “OK” to return to the list of virtual machines. Make sure your Ubuntu Linux virtual machine is selected and click on “Start” to power on your virtual machine (reading and accepting all the messages that appear of course).

It seems the virtual machine doesn’t have enough memory to load the Ubuntu Linux desktop properly. No problem. Just select “Close…” from the “Machine” menu and power off the virtual machine.

Now go back to the System panel in Settings and set the base memory to 256MB. Once you’ve changed the base memory simply click on Start to power on your virtual machine again. This time it should display the desktop without freezing. It all depends on how much memory you allocate to your virtual machine – the more the better, but don’t allocate too much or your real computer will run out of real memory.

Eventually you should see your Ubuntu Linux virtual machine presenting you with a menu like the one shown below. Select “Try Ubuntu without any change to your computer” by obtaining mouse focus on your virtual machine and pressing Enter. This will run Ubuntu Linux from its CD, but you can install it on your 8GB virtual hard disk later on if you plan on using it beyond merely poking around and checking it out.

And here’s the Ubuntu Linux desktop in all its glory. Go ahead and click inside your virtual machine to obtain mouse focus. Now explore Ubuntu’s menus – Applications, Places, and System.

If you select the full screen option from the virtual machine’s Machine menu you’ll be able to display your virtual machine’s screen without the clutter of your Windows XP desktop behind it. See the screenshot below.

Here’s what it would look like without full screen mode turned on.

Here’s me starting a chess game, an image editor (called GIMP), and a popular open source word processing application for Linux called OpenOffice.org Word Processor (which some say easily rivals Microsoft’s Word).

Here’s a command terminal, a calculator, a simple text editor, and a CD/DVD creator.

Here’s me browsing Wikipedia, Facebook, Twitter, and checking Gmail with the Mozilla Firefox Web browser.

Finally, to shut down Ubuntu Linux, simply click on the red power button in the top-right corner and select “Shut Down”.

That concludes my tutorial on running Ubuntu Linux in Windows XP using Sun VirtualBox. I hope you’ve enjoyed following it and maybe you will at least try a few different distributions of Linux now that you know you can run them in virtual machines on your existing Windows-based computer without needing to drastically change your computing environment.

Gavin Kendall / Psyphen Codewalker
http://gir.slampt.net/~gavin/

Filed under: Tutorials

4 Responses to "Running Ubuntu Linux In Windows XP Using Sun VirtualBox"

  1. blacklisted says:

    wow – fantastic tutorial gav. no wonder you were up until 3 last night writing it. :)
    I’m sure lots of people will find it helpful. virtual machines are a good way to test linux without making the full switch right away.

  2. Yarrr, good stuff. I would add also that this method would work equally well for trying distributions other than Ubuntu, and even for trying out other versions of Windows.

  3. WelshPixie says:

    Yeah, we ran a Vista install through SVB to test it worked and to compare the install process with that of Linux, hehe. Then we ran Linux inside the Vista that was running inside SVB in Linux… Recursive Operating Systems!

  4. [...] Free Cookies . Linux for the technically challenged. Home · About Us · Running Ubuntu Linux In Windows XP Using Sun VirtualBox. By psyphen, August 16, 2009 2:32 am. Perhaps the safest and most comfortable way for a Windows user to try …More [...]

Leave a Reply