Installing Linux in a Virtual Machine

While it is not very difficult to install Linux alongside Windows or Mac OS X in a separate partition, it is often quicker and “safer” to install Linux within a virtual machine on the host operating system.  A virtual machine is basically a program that runs in your host operating system and simulates the environment for a completely separate computer system, where you can install basically any guest operating system.  The “host” operating system is your main operating system.  If you bought a computer from Dell, your host operating system is most likely Windows.  If you bought a Macintosh computer, your host operating system is Mac OS.  The guest operating system is the operating system that is being installed within the virtual machine.  We will be using the VirtualBox virtual machine because it’s open source and freely available.

1.) Go to the Virtual Box website and download the version of virtual box that matches your host operating system.
https://www.virtualbox.org/wiki/Downloads

The installation process should be as simple as installing any other program on your host operating system.

Now that you have Virtual Box installed, we need to install Linux within a new virtual machine.  We will be using the 64-bit version of Ubuntu 12.04.  There are a number of flavors of Linux, but Ubuntu happens to be one of the most popular Linux desktop operating systems today (8/22/2012).  If you were to install Linux natively on your computer, you would download an .ISO image, burn it to a CD, then boot from that CD.  However, since are using a virtual machine, all you have to do is download the .ISO image and use VirtualBox to install from the .ISO image.

2.) Download the Ubuntu install image.  Go to: http://www.ubuntu.com/download/desktop and select the 64-bit version for download.

3.) Install Ubuntu within VirtualBox.
Within VirtualBox, click on Machine -> New…
Give the new virtual machine a name like, “Ubuntu.”  For Operating System type, select Linux and Ubuntu (64-bit) for the version.  The default settings are selected based on the operating system type and version, so just click Next through the following menus unless you really want to change the settings.  Many of these settings can be changed later as well.  After the Virtual Machine has been created, right-click on the new machine in the VirtualBox manager and click Start. When your virtual machine starts for the first time, VirtualBox will run a wizard where it will ask you to “Select Installation Media.”  When asked for the installation media, use the folder icon to navigate for the Ubuntu .ISO image that you downloaded in the previous step.  Click Next through the remaining options and Ubuntu 12.04 will begin installing itself in your virtual machine as if it were installing on a system from scratch.

4.) Notes when installing Ubuntu:

  1. When asked to “Try Ubuntu” or “Install Ubuntu” click on “Install Ubuntu.”
  2. If you have have an internet connection during installation, you should click on “Download updates while installing” and “install this third-party software.” 
  3. Under “Installation Type,” click on”Erase disk and install Ubuntu.”If running the Ubuntu CD from within the virtual machine, this will only affect the virtual machine’s disk space, not the disk space outside of the virtual machine.  Make sure this is installing within the virtual machine, otherwise, you could be overwriting your host operating system’s disk space.

After installing Ubuntu within VirtualBox, check out the next tutorial on some basic Linux operating procedures.

Questions / Comments:
Author: Kevin DeMarco
kevin.demarco@gtri.gatech.edu