Virtualbox

Download and Install VirtualBox

So you want to start looking into Linux? That is great! The best thing about Linux is many modern operating systems can ‘trial run’ Linux through a Virtual Machine. The best way to explore Linux whether you run a Macintosh computer or a Windows computer is to use VirtualBox. VirtualBox is a free program from Oracle that can be downloaded and installed on any major operating system. Make sure when you are downloading VirtualBox, you are downloading directly from the Oracle website. Grab the version for your specific operating system and install the program in the usual way for your computer.

Setup VirtualBox

Once VirtualBox is installed, the basic setup is similar for Windows and Mac. We will explain a very basic setup appropriate for quickly testing out a few Linux distros. When you run VirtualBox, you will see a blue button in the upper left of the program window. That is the ‘New‘ machine button. Click there and start by giving your machine a name. I chose ‘Generic Linux Test Machine‘. From the dropdown menu in the ‘Type‘ box select ‘Linux’ and under ‘Version‘ select ‘Other Linux (64 bit)’. You could select a specific name for the Linux distro you are testing, but the generic 64 bit option will work just fine for our present purposes. Click the Continue button. The next option is to select the Memory Size of the machine. This is the RAM, not the Disk Space. On my testing machines that are lower end for these videos, I am choosing half of my RAM so I manually entered 2048 MB into the box and click Continue. For the hard disk, select ‘Do not add a virtual hard disk‘. You will get a warning about not adding a Hard Disk; just click through this.  We will add a hard disk when we actually install a Linux distro in the VirtualBox. Click ‘Create‘ and you will now have a basic machine setup.

After Setup

I like to make sure my virtual machines are running at least two cores, and this option is not in the initial setup, so we want to click the new machine we just created (just once), and click on the Settings next to the New button. Click the second option, System, from the tabs on top or to the left of the settings (this depends on the version and the operating system of VirtualBox). Three options will appear. The first is the Motherboard where you can set the RAM, the boot order, and a few other settings. You can leave these mostly alone. The second tab is Processor. We want to go into that tab and change the processors to at least two assuming you are running at least a four core computer, otherwise leave it as one (Note, if you cannot change the number of cores, there is a setting in the BIOS about virtual machines. I will cover that in a Tip and Trick post another time). Once you are done with the processor, you will want to move over to the Display tab. The first set of options, Screen, you should change the Video Memory to about half of your machine. My computer has 128 MB so I made my virtual machine have 64 MB. This is so that modern operating systems run a little smoother. You should now be ready to try out some distros.

Test Driving a Distro

In order to test out distro, we need to have a bootable disk in the ‘drive’. Our virtual machine was configured with an optical drive that is like a CD-ROM. When you click on the machine, the fourth block down you will see Storage. In that section, you should see a part that says, “IDE Secondary Master: [Optical Drive] Empty. That is the link you will click to ‘load’ a disk image into the machine. The Linux distros that we downloaded are such disk images. Click on that link and you will see the option to Choose disk image… If there is already a disk in there, you can select the bottom link to Remove disk from virtual drive. This is just like making sure your disk drive is empty prior to restarting your computer. Select the desired image and push the Start button in the top of the program by New.  This will start the boot sequence, so you should see the startup processes and text as it loads modules.  Most distros will take about a minute to load in a virtual machine, so once it is done you will usually select the ‘Try‘ option rather than the ‘Install‘ option.  Once the machine is done loading, you should be able to play around.  You can look at the software, get on the internet, and explore.  Feel free to play around in the operating system. Many Linux distros will not be full-screen in the VirtualBox, we will talk about how to fix that later.

Installing Linux on a Virtual Machine

Once you have test driven a few distros, you can install a distro on your VirtualBox.  This is a great way to start getting used to Linux and you can even install programs, write documents, and more.  Remember that installing Linux on the VirtualBox is not the same as installing it on your main computer, so you will not damage your computer.  You can always delete the files, machines, and settings at any time. Our first step is to add a Hard Disk to our VirtualBox.  Since we did not add a disk earlier, we need to first add a Controller and then we will add the disk.  You will want to click on the machine in the list of machines and then click Settings.  On the Storage tab, you will see the Storage Tree.  The first item in there should say Controller: IDE and you should see a picture of a CD that may say Empty or it will have the disk image you selected loaded.  On the right of that selection box you will see two options the first is Adds optical drive and the second is Adds hard disk.  Click on the Adds hard disk and you will see an option to Choose existing disk or Create new disk.  You will want to Create new disk and select VDI (VirtualBox Disk Image) and click Continue.  Select the Dynamically Allocated option and click Continue.  You will need to give the disk a name (You can use the same disk in a few virtual machines).  You will want to change the site to at least 20 GB in order to install the operating system and make a little use of the machine.  Click Create and you will see that the disk is added to the machine.

Next you need to add the disk image for the Linux distro you want to install into the optical drive and start the machine.  This time when the machine loads, you will select the ‘Install‘ option.  From here, you will want to flip through the notes on the distro’s webpage to read any pertinent information.  In general, most distros will just install themselves without any problems.  Depending on your Linux choice, you will have a few options.  If you see an option to load Codecs, you might want to do that if you want to listen to music or watch videos.  Some distros like Fedora do not offer the Codecs on the install packages but others like Ubuntu and Mint do offer multimedia support.  The machine will probably take about 20-30 minutes to install, then you will shut down the machine, remove the disk image from the Optical Drive and restart the machine.  You will now have a new computer that is installed in VirtualBox and anything you do in that computer will be saved when you turn it on again.