Linux is not for everyone. It is, however, a perfectly acceptable (and dare I say good) alternative to Windows and OS X. It offers near-limitless control over an operating system and is available for free. Furthermore, Ubuntu, a popular variety of the open-source OS, works well on a Mac, and best of all, it can be booted natively.
Read on to find out how.
Running Ubuntu on your Mac will require a few things: an EFI boot menu called rEFInd, a Linux Live CD or USB, and some spare time. The method outlined below was completed on a 2012 MacBook Air, but it should work on other models as well.
CAUTION: Backup your hard drive before continuing as this tutorial requires modifying the partitions on your hard drive and running third-party software at boot.
The first thing to do when installing a new operating system is to determine how much hard drive space it will maintain. I use a sparse 64GB hard drive so I made available 20GB of that to Ubuntu. The minimum is around 5GB, but you need much more if you intend to use Ubuntu as your daily OS.
In OS X, open up Disk Utility to split your drive into two parts. If you're just making one additional partition, Disk Utility will preserve your OS X partition so you won't need to reformat it.
Tip: OS X prevents you from splitting it beyond two partitions, so if you already have a boot camp installation or you want to triple-boot OS X, Windows, and Linux, you will need to wipe the drive, create your three partitions, and then reinstall OS X followed by your other two OS variants.
First, select the top-level drive in the left-side menu, and then click the Partition tab. At the bottom, click the + (plus) button in the lower left-hand corner and then name your new partition. You can then resize it by dragging the lower right hand corner of the partition square or by typing a specific amount of gigabytes into the textbox. Once you're satisfied, click Apply to let Disk Utility create a space for Ubuntu.
Make a Live Boot Drive
In the heyday of disc-based media, a Linux distribution (distro) could run from a CD in its full glory. This was a low-cost way for new users to test out Linux and sample a few different distros. Nowadays, the same is possible with a USB drive with at least 2GB of storage.
Step 1: Really, It's Free
Ubuntu is a free, open-source operating system, as are many of the other variants of Linux. You may download Ubuntu, Desktop or Server and 32-bit or 64-bit versions, from the Ubuntu website. If you are using a Core i5 or better Mac, you will want to download the 64-bit edition to maximize your hardware. Once downloaded, you will have a disc image to load onto your USB drive.
Step 2: My Friend, Terminal
The easiest way to convert a disc image into a bootable USB is to use Terminal. The first thing to do in Terminal is determine what drive name OS X has assigned to your USB drive. To do that, run:
diskutil unmountDisk /dev/diskN
(where N is the number correlating to you USB drive)
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
replacing /path/to/downloaded.img with the location of your Ubuntu download.
You will be prompted for your password. If you are successful, the cursor will flash for a few moments while the disc image is moved over. When the copy has completed, you will be asked to eject the drive.
Tip: If you don't want to type in the local destination of your disc image, you can open the folder where it downloaded and then drag it onto the Terminal window. It's folder location will be added wherever your cursor was in Terminal.
Since OS X Lion, Apple has permitted third-party access to the EFI portion of the logic board to boot different operating systems natively. To take advantage of this, you'll to download rEFInd, an open-source boot menu that adds an OS selection screen to your Mac's boot process.
To install rEFInd, unzip the downloaded file. Next, open Teriminal and type:
sudo /path/to/unzipped_rEFInd file/install.sh
to install it.
Step 1: Ubuntu Installation
Insert the LiveUSB you made earlier, and reboot your Mac. You'll see that rEFInd has taken over the typical boot screen. Use the arrows to choose the Boot EFI\boot\grubx64.efi to boot Ubuntu from the LiveUSB. If you don't make a selection, OS X will automatically boot after a 20 second wait time.
Tip: If the look of rEFInd leaves a bad taste in your mouth, you can download custom themes to make it better reflect the default Apple design.
The LiveUSB will give three options; choose Install Ubuntu unless you want to give it a test drive (the first option).
Installing Linux is much like installing any other OS until you get to the drive selection screen. Linux distributions require an extra section of hard drive called the swap partition that helps the system run more efficiently.
Step 2: More Partitioning
Assuming you don't want to override your OS X installation, we'll need to open the advanced options on the drive selection screen. On the Installation Type screen, select "Something Else" in order to modify the partition table.
Click on the partition you made earlier, and use the Change... to convert all but 1GB of it to free space for Ubuntu. Next, select the remaining 1GB and change it to swap space.
You should now be able to continue through the install screens, creating a user account, password, and copying files over to the partition.
Upon reboot, you should now see a new rEFInd option to boot directly into Ubuntu.
If you select that, you will be taken to the GRUB selection screen where you can then select to boot into the OS. This adds a step to the simple process of booting an OS but you can edit the timeout of the GRUB boot screen to remove the extra time.
Ubuntu on a Mac runs quite well. It boots in less than 10 seconds and automatically detected my MacBook Air and recommended a closed source driver to improve my MacBook Air's wireless connectivity. Although it's against the Linux way, I took Ubuntu up on the recommendation.
Some further niceties are that two-finger scrolling works immediately when selected from the settings, and the battery life is within an hour of OS X's length. I have experienced some computer sleep issues when using my OS X partition--though it sleeps fine in Ubuntu--but those could be isolated to my system.
If you run into a bug or problem, use the comments to let others know.