How to Install and Dual Boot Linux and Mac OS

How and why you should install Ubuntu on your Mac computer.

The Mac is one of the most reliable computing platforms available, and can make a great platform for not only running the Mac OS, such as the current macOS Sierra, but also Windows and Linux. In fact, the MacBook Pro is a very popular platform for running Linux.

Under the hood, the Mac's hardware is remarkably similar to most of the parts used in modern PCs. You'll find the same processor families, graphics engines, networking chips, and a great deal more.

Running Windows on a Mac

When Apple changed from PowerPC architecture to Intel, many wondered if the Intel Macs could run Windows. Turns out the only real stumbling block was getting Windows to run on an EFI-based motherboard instead of the then much more common BIOS-based designs.

Apple even lent a hand to the effort by releasing Boot Camp, a utility that included Windows drivers for all of the hardware in the Mac, the ability to assist a user in setting up the Mac for dual booting between the Mac OS and Windows, and an assistant for partitioning and formatting a drive for use by the Windows OS.

Running Linux on a Mac

If you can run Windows on a Mac, certainly you should be able to run just about any OS that is designed for the Intel architecture, right? Generally, this is true, though, like a lot of things, the devil is in the details. Many Linux distributions are able to run very nicely on a Mac, though there can be challenges to installing and configuring the OS.

Level of Difficulty

This project is for advanced users who have the time to work through issues that may develop along the way, and are willing to reinstall the Mac OS and their data if problems occur during the process.

We don’t believe there will be any huge issues, but the potential exists, so be prepared, have a current backup, and read through the whole process before installing Ubuntu.

Installation and Drivers

Use Carbon Copy Cloner to create a backup before installing Ubuntu on your Mac.
Courtesy of Bombich Software

The issues we've come across for getting a Linux distribution working a Mac have usually revolved around two problem areas: getting an installer to work correctly with the Mac, and finding and installing all the needed drivers to make sure the important bits of your Mac will work. This can include getting the drivers needed for Wi-Fi and Bluetooth, as well as drivers needed for the graphics system your Mac uses.

It's a shame Apple doesn’t provide generic drivers that could be used with Linux, along with a basic installer and assistant, as it has done with Windows. But until that happens (and we wouldn’t hold our breath), you're going to have to tackle the installation and configuration issues somewhat by yourself.

We say "somewhat" because we're going to provide a basic guide to getting a favorite Linux distribution working on an iMac, as well as introduce you to resources that can help you track down drivers you need, or help solve installation issues you may come across.


There are many Linux distributions you can choose from for this project; some of the best known include (in no particular order) Debian, MATE, elementary OS, Arch Linux, OpenSUSE, Ubuntu, and Mint. We decided to use Ubuntu for this project, mainly because of the very active forums and support available from the Ubuntu community, as well as the coverage of Ubuntu provided in our own Linux How-To's.

Why Install Ubuntu on Your Mac?

There are a ton of reasons to want to have Ubuntu (or your favorite Linux distribution) running on your Mac. You may just wish to broaden your technology chops, learn about a different OS, or have one or more specific apps you need to run. You may be a Linux developer and realize that the Mac is the very best platform to use (We may be biased in that viewpoint), or you may simply want to try Ubuntu out.

No matter the reason, this project will help you install Ubuntu on your Mac, as well as enable your Mac to easily dual boot between Ubuntu and Mac OS. Actually, the method we'll use for dual booting can easily be expanded to triple booting or more.

What You Need

  • A recent backup. We recommend a clone on an external bootable drive that includes a copy of the Recovery HD volume. We recommend Carbon Copy Cloner, which can create the clone and include the Recovery partition. Once you have a working clone, disconnect it from your Mac to ensure that the clone backup isn't accidentally erased during the Ubuntu install.
  • A Mac with 2 GB of RAM and a 2 GHz dual-core processor. As you might suspect, these are the bare minimums; more RAM and faster processor speeds or additional processor cores can only be helpful. We're installing on a 2014 27-inch Retina iMac, but the basic process should work for any modern Mac (newer than 2011). If you're going to use an older Mac, you should still be able to install Ubuntu but you'll need to pay attention to how the boot process works for older hardware. If you have problems getting your older Mac to work with Ubuntu, stop by the Ubuntu forums and search for install guides for your Mac model.
  • A 2 GB or larger USB flash drive. The flash drive will be used as a bootable Ubuntu installer that contains not only the basic installer, but a live version of Ubuntu that you can run directly from the USB flash drive without modifying anything on your Mac. This is a great way to test whether your Mac and Ubuntu can get along.
  • A USB keyboard and mouse. You need a USB-based keyboard and mouse because it's highly likely that the Ubuntu Bluetooth drivers will need to be installed or updated before a wireless keyboard or mouse will work.
  • 25 GB free drive space. This is the minimum size recommended for the desktop version of Ubuntu that we'll be installing; more space to work with can be a benefit.
  • Ubuntu 16.04.1 LTS. This is the current stable version of Ubuntu that was available when we started this project. Later versions should work as well, just check the release notes for any specific changes that may affect installation or use on your Mac.

Create a Live Bootable USB Ubuntu Installer for Mac OS

Unetbootin Live USB creation tool
UNetbootin simplifies the creation of a Live USB Ubuntu installer for your Mac. Screen shot courtesy of Coyote Moon, Inc.

Our first task in installing and configuring Ubuntu on your Mac is to create a live bootable USB flash drive that contains the Ubuntu Desktop OS. We will use this flash drive to not only install Ubuntu, but to check that Ubuntu can run on your Mac by using the ability to boot Ubuntu directly from the USB stick without having to perform an install. This lets us check basic operations before you commit to altering your Mac's configuration to accommodate Ubuntu.

Preparing the USB Flash Drive

One of the first stumbling blocks you may encounter is how the flash drive should be formatted. Many folks mistakenly believe the flash drive needs to be in a bootable FAT format, requiring the partition type to be Master Boot Record, and the format type to be MS-DOS (FAT). While this may be true of installations on PCs, your Mac is looking for GUID partition types for booting, so we need to format the USB flash drive for use on the Mac.

The following process will completely erase any data you may have on the USB flash drive.

  1. Insert the USB flash drive, and then launch Disk Utility, which is located at /Applications/Utilities/.
  2. Locate the flash drive in Disk Utility's sidebar. Be sure to select the actual flash drive, and not the formatted volume that may appear just below the flash drive's manufacturer name.
  3. Click the Erase button in the Disk Utility toolbar.
  4. The Erase sheet will drop down. Set the Erase sheet to the following options:
    1. Name: UBUNTU
    2. Format: MS-DOS (FAT)
    3. Scheme: GUID Partition Map
  5. Once the Erase sheet matches the settings above, click the Erase button.
  6. The USB flash drive will be erased. When the process is complete, click the Done button.
  7. Before you leave Disk Utility you need to make a note of the flash drive's device name. Make sure the flash drive named UBUNTU is selected in the sidebar, then in the main panel, look for the entry labeled Device. You should see the device name, such as disk2s2, or in my case, disk7s2. Write down the device name; you will need it later.
  8. You can quit Disk Utility.

UNetbootin Utility

We're going to use UNetbootin, a special utility for creating the Live Ubuntu installer on the USB flash drive. UNetbootin will download the Ubuntu ISO, convert it to an image format the Mac can use, create the boot chain needed by the installer for the Mac OS, and then copy it to the USB flash drive.

  1. UNetbootin can be downloaded from the UNetbootin github site. Be sure to pick the Mac OS X version (even if you're using macOS Sierra).
  2. The utility will download as a disk image, with the name unetbootin-mac-625.dmg. The actual number in the file name may change as newer versions are released.
  3. Locate the downloaded UNetbootin disk image; it will probably be in your Downloads folder.
  4. Double-click the .dmg file to mount the image on your Mac's desktop.
  5. The UNetbootin image opens. You don’t need to move the app to your Applications folder, though you can if you wish. The app will work just fine from within the disk image.
  6. Launch UNetbootin by right-clicking on the unetbootin app and selecting Open from the popup menu. Note that we're using this method to launch the app because the developer isn't a registered Apple developer, and your Mac's security settings may prevent the app from launching. This method of launching the app lets you bypass the basic security settings without having to go into the System Preferences to change them.
  7. Your Mac's security system will still warn you about the developer of the app being unrecognized, and ask if you really want to run the app. Click the Open button.
  8. A dialog box will open, saying osascript wants to make changes. Enter your administrator password and click OK.
  9. The UNetbootin window will open. UNetbootin supports creating the Live USB installer for Linux using an ISO file you previously downloaded, or it can download the Linux distribution for you. Do not choose the ISO option; UNetbootin is currently unable to create a Mac-compatible bootable USB drive using a Linux ISO you download as the source. It can, however, properly create the bootable USB drive when it downloads the Linux files from within the app.
  10. Make sure Distribution is selected, then use the Select Distribution dropdown menu to pick the Linux distribution you would like to install on the USB flash drive. For this project, select Ubuntu.
  11. Use the Select Version dropdown menu to select 16.04_Live_x64. We selected the 16.04_Live_x64 version because this Mac uses a 64-bit architecture. Some early Intel Macs used a 32-bit architecture, and you may need to select the 16.04_Live version instead. If you’re a bit adventurous, you can select the Daily_Live or Daily_Live_x64 versions, which will have the most current beta version of Ubuntu. This can be helpful if you have issues with the Live USB running correctly on your Mac, or with drivers such as Wi-Fi, Display, or Bluetooth not working.
  12. The UNetbootin app should now list the type (USB Drive) and Drive name that the Ubuntu Live distribution will be copied to. The Type menu should be populated with USB Drive, and the Drive should match up to the device name you made a note of earlier, when you were formatting the USB flash drive.
  13. Once you have confirmed that UNetbootin has the proper Distribution, Version, and USB Drive selected, click the OK button.
  14. UNetbootin will download the selected Linux distribution, create the Live Linux install files, create the bootloader, and copy them to your USB flash drive.
  15. When UNetbootin finishes, you may see the following warning: "The created USB device will not boot off a Mac. Insert it into a PC, and select the USB boot option in the BIOS boot menu." You can ignore this warning as long as you used the Distribution option and not the ISO option when creating the bootable USB drive.
  16. Click the Exit button.

The Live USB flash drive containing Ubuntu has been created and is ready to try out on your Mac.

Creating a Ubuntu Partition on Your Mac

Use Disk Utility to Partition for a Ubuntu Volume
Disk Utility can partitionan existing volume to make room for Ubuntu. Screen shot courtesy of Coyote Moon, Inc.

If you plan on permanently installing Ubuntu on your Mac while keeping Mac OS, you'll need to create one or more volumes specifically for housing the Ubuntu OS.

The process is actually very simple; if you've ever partitioned your Mac's drives, then you already know the steps involved. Essentially, you'll use Disk Utility to partition an existing volume, such as your Mac's startup drive, to make room for a second volume. You could also use an entire drive, other than your startup drive, to house Ubuntu, or you could create another partition on a non-startup drive. As you can see, there are lots of choices.

Just to add another option, you could also install Ubuntu on an external drive connected via USB or Thunderbolt.

Ubuntu Partitioning Requirements

You may have heard that Linux OSes need multiple partitions to run at their best; one partition for disk swap space, another for the OS, and a third for your personal data.

While Ubuntu can use multiple partitions, it's also capable of being installed in a single partition as well, which is the method we will use. You can always add a swap partition later from within Ubuntu.

Why Create Just One Partition Now?

We're going to use the disk partitioning utility included with Ubuntu to actually create the needed storage space. What we need the Mac's Disk Utility to do for us is define that space, so it's easy to select and use when installing Ubuntu. Think of it this way: when we get to the point in the Ubuntu install where the drive space is assigned, we don’t want to accidentally choose the existing Mac OS drive, or any of the Mac OS data drives you use, since creating the space will erase any information on the selected volume.

Instead, we'll create a volume with an easy to identify name, format, and size that will stand out when it comes time to select a volume for the Ubuntu installation.

Use Disk Utility to Create the Ubuntu Install Target

There is a fine write-up we're going to send you off to read that tells you the details, step-by-step, for formatting and partitioning a volume using the Mac's Disk Utility

Partitioning, resizing, and formatting any drive can result in data loss. Make sure you have a current backup of any data on the selected drives involved.

If you're using a Fusion drive, the Mac OS imposes a limit of two partitions on the Fusion volume. If you've already created a Windows Boot Camp partition, you won't be able to add a Ubuntu partition as well. Consider using an external drive with Ubuntu instead.

If you're going to use an existing partition, take a look at these two guides to resizing and partitioning:

If you plan on using an entire drive for Ubuntu, use the formatting guide:

No matter which of the guides you use, remember that the partition scheme should be GUID Partitioning Map, and the format can be MS-DOS (FAT) or ExFat. The format doesn't really matter since it will change when you install Ubuntu; its purpose here is only to make it easy to spot which disk and partition you'll be using for Ubuntu later on in the install process.

One final note: Give the volume a meaningful name, such as UBUNTU, and make a note of the partition size you make. Both pieces of information will help in identifying the volume later, during the Ubuntu install.

Using rEFInd as Your Dual-Boot Manager

rEFInd boot manager for Mac OS
rEFInd allows your Mac to boot from multiple operating systems, including OS X, Ubuntu, and others. Screen shot courtesy of Coyote Moon, Inc.

So far, we've been working on getting your Mac ready to receive Ubuntu, as well as preparing a bootable installer that we can use for the process. But so far, we've overlooked what's needed to be able to dual boot your Mac into the Mac OS as well as the new Ubuntu OS.

Boot Managers

Your Mac already comes equipped with a boot manager that lets you choose between multiple Mac or Window OSes that may be installed on your Mac. In various guides, I routinely explain how to invoke the boot manager at startup by holding down the option key, such as in the Using the OS X Recovery Disk Assistant guide.

Ubuntu also comes with its own boot manager, called GRUB (GRand Unified Boot Loader). We'll be using GRUB shortly, when we run through the installation process.

Both of the boot managers available to use can handle the dual-booting process; actually they can handle many more OSes than just two. But the Mac's boot manager won’t recognize the Ubuntu OS without a bit of fiddling, and the GRUB boot manager just isn't to my liking.

So, we're going to suggest you make use of a third-party boot manager called rEFInd. rEFInd can handle all of your Mac's booting needs, including letting you select the Mac OS, Ubuntu, or Windows, if you happen to have it installed.

Installing rEFInd

rEFInd is easy to install; a simple Terminal command is all that's needed, at least if you're using OS X Yosemite or earlier. OS X El Capitan and later has an additional security layer called SIP (System Integrity Protection). In a nutshell, SIP prevents ordinary users, including administrators, from changing system files, including preference files and folders the Mac OS uses for itself.

As a boot manager, rEFInd needs to install itself within areas protected by SIP, so if you're using OS X El Capitan or later, you'll need to disable the SIP system before proceeding.

Disabling SIP

  1. Use the instructions in the Using the OS X Recovery Disk Assistant guide, linked above, to restart your Mac using the Recovery HD.
  2. Select Utilities Terminal from the menus.
  3. In the Terminal window that opens, enter the following:
    csrutil disable
  4. Press Enter or Return.
  5. Restart your Mac.
  6. Once you have the Mac desktop back, launch Safari and download rEFInd from SourceForge at rEFInd beta, an EFI boot manager utility.
  7. Once the download completes, you can find it in a folder named refind-bin-0.10.4. (The number at the end of the folder name may change as new versions are released.) Open the refind-bin-0.10.4 folder.
  8. Launch Terminal, located at /Applications/Utilities/.
  9. Arrange the Terminal window and the refind-bin-0.10.4 Finder window so that both can be seen.
  10. Drag the file named refind-install from the refind-bin-0.10.4 folder to the Terminal window.
  11. In the Terminal window, press Enter or Return.
  12. rEFInd will be installed on your Mac.
    Optional but recommended:
    1. Turn SIP back on by entering the following in Terminal:
      csrutil enable
    2. Press Enter or Return
  13. Close Terminal.
  14. Shut down your Mac. (Do not Restart; use the Shut Down command.)

Using the Live USB Drive to Try Out Ubuntu on Your Mac

Live Ubuntu Desktop
The Live Ubuntu Desktop is a good way to ensure your Mac can run Ubuntu without many issues. Screen shot courtesy of Coyote Moon, Inc.

The Live USB for Ubuntu we created earlier can be used for permanently installing Ubuntu on your Mac, as well as trying out Ubuntu without actually installing the OS. You can certainly jump to doing an install, but I'm going to recommend you try Ubuntu first. The main reason is that it will let you discover any problems you're facing before committing to a full install.

Some of the issues you may find include the install of Live USB not working with your Mac graphics card. This is one of the more common issues Mac users face when installing Linux. You may also find out that your Wi-Fi or Bluetooth isn't operating. Most of these issues can be corrected after the install, but knowing about them ahead of time lets you do a little research from your familiar Mac environment, to track down the issues and possibly acquire needed drivers, or at least know where to get them from.

Trying Out Ubuntu on Your Mac

Before you try booting to the Live USB drive you created, there's a bit of preparation to perform.

  • Make sure the Live USB flash drive is connected directly to one of your Mac's USB or Thunderbolt ports. Do not use a USB hub, as it's not uncommon for the Live USB flash drive to fail to show up when connected via a hub.
  • Make sure you have a USB keyboard and USB mouse connected to your Mac. Remember, one of the common issues is missing Bluetooth drivers, which would prevent your wireless keyboard and mouse from being used.
  • If possible, connect your Mac to your home network via a wired Ethernet port. This is for the same reason as the wireless keyboard or mouse; the possibility that Wi-Fi drivers will need to be updated or added to get your wireless network working.

If you're ready, let's give it the boot.

  1. Shut Down or Restart your Mac. If you installed rEFInd the boot manager will automatically appear. If you chose not to use rEFInd then as soon as your Mac starts to boot up, hold down the Option key. Keep holding it down until you see the Mac's boot manager display a list of available devices you can start up from.
  2. Use the arrow keys to select either the Boot EFI\boot\... entry (rEFInd) or the EFI Drive entry (Mac boot manager) from the list. If you don’t see an EFI Drive or Boot EFI\boot\... in the list, shut down and make sure the Live USB flash drive is connected directly to your Mac. You may also want to remove all peripherals from your Mac, except the mouse, keyboard, USB Live flash drive, and wired Ethernet connection.
  3. After you select the Boot EFI\boot\... or EFI Drive icon, press Enter or Return on the keyboard.
  4. Your Mac will boot using the Live USB flash drive and present the GRUB 2 boot manager. You'll see a basic text display with at least four entries:
    1. Try Ubuntu without installing.
    2. Install Ubuntu.
    3. OEM install (for manufacturers).
    4. Check disc for defects.
  5. Use the arrow keys to select Try Ubuntu without installing, then press Enter or Return.
  6. The display should go dark for a short time, then display a Ubuntu splash screen, followed by the Ubuntu desktop. The total time for this should be 30 seconds to a few minutes. If you wait longer than five minutes, there's likely a graphics problem. If your display remains black, you never leave the Ubuntu splash screen, or the display becomes unreadable, you likely have a graphics driver problem. You can fix this by modifying the Ubuntu boot loader command as outlined below.

Modifying the GRUB Boot Loader Command

  1. Shut down your Mac by pressing and holding the Power button.
  2. Once your Mac shuts down, restart and return to the GRUB boot loader screen using the instructions above.
  3. Select Try Ubuntu without installing, but do not press the Enter or Return key. Instead press the 'e' key to enter an editor that will allow you to make changes to the boot loader commands.
  4. The editor will contain a few lines of text. You need to modify the line that reads:
    linux/casper/vmlinuz.efi file=/cdrom/preseed/Ubuntu.seed boot=casper quiet splash ---
  5. Between the words 'splash' and '---' you need to insert the following:
  6. The line should end up looking like this:
    linux   /casper/vmlinuz.efi file=/cdrom/preseed/Ubuntu.seed boot=casper quiet splash nomodeset ---
  7. To make the edit, use the arrow keys to move the cursor to the location just after the word splash, then type 'nomodeset' without the quotes. There should be a space between splash and nomodeset as well as a space between nomodeset and ---.
  8. Once the line looks correct, press F10 to boot with the new settings.

The changes you just made are not saved; they're used just this one time. Should you need to use the Try Ubuntu without installing option in the future, you'll need to edit the line once again.

Adding 'nomodeset' is the most common method of correcting a graphics issue when installing, but it's not the only one. If you continue to have display issues, you can try the following:

Determine the make of the graphics card your Mac uses. You can do this by selecting About This Mac from the Apple menu. Look for the text Graphics, make a note of the graphics being used, and then use one of the following values instead of 'nomodeset':




If you're still having problems with the display, check the Ubuntu forums for issues with your specific Mac model.

Now that you have a Live version of Ubuntu running on your Mac, check to make sure your WI-Fi network is working, as well as Bluetooth, if needed. 

Installing Ubuntu on Your Mac

Partitioning the drives for installing Ubuntu
After locating the 200 GB volume you previously formats as FAT32, you can change the partition to EXT4 and set the mount point as Root (/) for the installation of Ubuntu on your Mac. Screen shot courtesy of Coyote Moon, Inc.

By now, you have a working Live USB flash drive that contains the Ubuntu installer, your Mac configured with a partition ready to be used for installing Ubuntu, and an itchy mouse finger just waiting to click on the Install Ubuntu icon you see on the Live Ubuntu desktop.

Install Ubuntu

  1. If you're ready, double-click the Install Ubuntu icon.
  2. Select the language to use, and then click Continue.
  3. Allow the installer to download updates as needed, for both the Ubuntu OS as well as drivers you may need. Place a checkmark in the Download Updates while installing Ubuntu checkbox, as well as in the Install third-party software for graphics and WI-FI hardware, Flash, MP3, and other media checkbox. Click the Continue button.
  4. Ubuntu offers a number of installation types. Since we wish to install Ubuntu on a specific partition, select Something Else from the list, and then click Continue.
  5. The installer will present a list of storage devices connected to your Mac. You need to find the volume you created using the Mac's Disk Utility a bit earlier. Because the device names are different, you need to use the size and format of the volume you created. Once you locate the correct volume, use the mouse or arrow keys to highlight the partition, and then click the Change button.
    Tip: Ubuntu shows the partition size in Megabytes (MB), while the Mac displays the size as Gigabytes (GB). 1 GB  = 1000 MB
  6. Use the Use as: dropdown menu to select the file system to use. We prefer the ext4 journaling file system.
  7. Use the Mount Point dropdown menu to select "/" without the quotes. This is also called the Root. Click the OK button.
  8. You may be warned that selecting a new partition size has to be written to the disk. Click the Continue button.
  9. With the partition you just modified selected, click the Install Now button.
  10. You may be warned that you did not define any partition to be used for swap space. You can add swap space later; click the Continue button.
  11. You will be told that the changes you made are about to be committed to the disk; click the Continue button.
  12. Select a time zone from the map or enter a major city in the field. Click Continue.
  13. Choose the keyboard layout, and then click Continue.
  14. Set up your Ubuntu user account by entering your name, a name for the computer, a username, and a password. Click Continue.
  15. The installation process will start, with a status bar displaying the progress.
  16. Once the installation completes, you can click the Restart button.

You should now have a working version of Ubuntu installed on your Mac.

After the restart completes, you may notice that the rEFInd boot manager is now operating and displays the Mac OS, the Recovery HD, and the Ubuntu OS. You can click on any of the OS icons to select the operating system you wish to use.

Since you're probably itching to get back to Ubuntu, click on the Ubuntu icon.

If after restarting you have issues, such as missing or non-functional devices (Wi-Fi, Bluetooth, printers, scanners), you can check with the Ubuntu community for tips about getting all of your hardware working.