TUTORIAL: How to run Ubuntu on a mac using Virtual Box
Ubuntu is a linux operating system. The unix command line is very similar to the linux command line and many commands work on both.
I personally like Fedora better than Ubuntu, but Fedora wouldn't work unless you partitioned off you internal hard drive, and I didn't really want to do that.
I have a 500 GB hard drive for Time Machine but I'm not going to use it all, so I decided that 1/2 goes to backups and 1/2 goes to other operating systems (Ubuntu, Android {there is an android emulator but it's harder to set up} etc...). The section that I am using for my Ubuntu is the Mac OS Extended type.
You can find tutorials and videos on the web on how to do all of that, or I could eventually do a tutorial.
Anyways...
#1. Download Virtual Box — it is your best free choice. You can download it from here
https://www.virtualbox.org/wiki/Downloads just click the VirtualBox 4.1.18 for OS X hosts link. And open the file once it downloads.
#2. Download your Ubuntu ISO file. This is basically the operating system. You can also put it on a cd, press C on startup, and have a complete boot from that, only you won't be able to save files unless you set up the whole partition thing (it's not that hard if you want to do it with your main drive). Download it from here
http://www.ubuntu.com/download/desktop . And download the 32 bit mode for now.
#3. Open VirtualBox and on the main screen click the "New" button.
On the wizard click "Continue" and name your device (something like ubuntu). Select the operating system as "Linux" and the version to "Ubuntu" not "Ubuntu 64" (unless you got the 64 bit version).
Select the amount of RAM that you want to give it. And click "Continue"
On the next screen make sure that the "Start-up" box is checked. And select the "Create New Hard Disk" option. Click "Continue".
Select the "VDI filetype" and click "Continue".
Dynamically allocated means that the system will use more disk space as it needs more.
Fixed size means that it only gets a certain amount and it can't use more than that.
I would use Dynamically allocated
Choose then click "Continue".
In the next screen by the name is a folder icon with an arrow. Click it and choose the location of it. Then select the initial size of the virtual disk. Click "Continue".
Click "Create".
Now select it from the list on the left and click "Start".
Click "Continue".
When you get to the part about the installation media click the folder with the arrow icon and navigate to the Ubuntu file that you downloaded and use that.
Click "Continue" then click "Start"
If everything worked right you should be prompted for a setup. Just enter your information for that and you will be set. You have to get used to it before you can really use it.
Good luck