How to Dual Boot Linux On Your Mac

By | January 8, 2022

Whether you need a customizable operating system or a better environment for software development, you can get it by installing Linux on your Mac. Linux is incredibly versatile (used to run everything from smartphones to supercomputers), and you can install it on your MacBook Pro, iMac, or even your Mac mini.

Apple added Boot Camp to macOS making it easy for people to dual boot Windows, but installing Linux is another matter entirely. Follow the steps below to learn how to do this.

Why Install Linux on Mac or MacBook Pro

Your Mac offers excellent performance, great battery life, and long-lasting durability. The hardware on a Mac is hard to match, which makes it a very powerful machine to run Linux on.

What’s more, Linux breathes life into older Macs that are no longer eligible for macOS updates. Instead of leaving your old MacBook Pro idle. Install the latest version of Linux and keep going for years to come.

Ubuntu Is Our Linux Distribution Of Choice

There are many versions of Linux available, but for the purposes of this tutorial, we recommend installing Ubuntu on your Mac. Ubuntu is the most popular Linux distribution, which means there is an active support community available if you need help.

Support Dual Boot or Not

With a dual boot system, both macOS and Linux are installed on your Mac. Stand Options when your computer boots up to choose which operating system to use. The main difference between a dual boot system and a virtual machine is that you can only use one OS at a time while dual-booting, but you get better performance.

If you don’t plan on using macOS anymore, you might want to switch to Linux instead. That way, none of your storage is used up by its system files.

However, if you change your mind, it can be difficult and time consuming to restore macros in the future. This is especially true because Linux writes through the MacOS Recovery partition.

Therefore, we recommend that you dual boot Linux on your Mac. If you’re absolutely sure you don’t want to do it, just skip the step Partition on the instructions below.

Step 1: Prepare Your Mac to Install Linux

To install Linux on your Mac, you’ll need a USB flash drive with at least 2GB of storage. You’ll be wiping the flash drive in the next step to install the Ubuntu installer, so make sure you back up any important files first.

Use an Ethernet adapter to connect your Mac to the internet. This is important, because your Wi-Fi may not work on Ubuntu without third-party drivers. Similarly, iMac users should use a USB keyboard or mouse, in case Bluetooth doesn’t work.

If you plan to dual boot your Mac with Linux, you also need to make sure you have enough free storage. open Apple menu > About This Mac > Storage to check if you have at least 25GB free (but more is better).

Finally, make a backup for your Mac (Read How to Use Time Machine to Back Up Your Mac). You should not lose any data by installing Linux on a dual boot partition. However, if something goes wrong, you may need to wipe your entire Mac to fix it.

If you plan to replace macOS with Linux, instead of creating a dual-boot system, use Carbon Copy Cloner to back up your macOS Recovery partition. This makes it a lot easier to go back to macOS again in the future.

Step 2: Create a Partition on Your Mac Drive

For a dual boot system (which we highly recommend), you will need to create a Linux partition on your Mac’s hard drive. If you don’t want to create a dual boot system, continue to the next step.

In fact, to dual boot Linux on a Mac, you’ll need two additional partitions: one for Linux and the second for swap space. The swap partition should be as large as the amount of RAM your Mac has. Check this by going to Apple menu > About This Mac.

Use Disk Utility to create a new partition on your Mac:

  • open Disk Utility from the Utilities folder in your Apps, or search through Spotlight.
  • In the upper left corner, select View > Show All Devices.
  • Select the highest-level drive for your Mac’s hard disk, then click Partition.
  • Use button Plus to create a new partition. Name UBUNTU and set the format to MS-DOS (FAT). Give as much space as you want to use for Linux.
  • Click Apply to create a partition.
  • Repeat the steps above to create another partition. Name SWAP this partition and set the format back to MS-DOS (FAT). Make the size according to the amount of RAM on your Mac. It might be 4GB or 8GB, for example.
  • Click Apply to create a partition.

If you can’t create a new partition, it could be because FileVault is encrypting your hard drive. open System Preferences > Security & Privacy > FileVault to turn it off.

Install rEFInd for Better Boot Options

The standard boot manager on your Mac doesn’t always work with Ubuntu. This means you will need to install a third-party boot manager, which will allow you to easily choose between macOS or Linux when you start your computer.

Thus, your next step is download rEFInd, which is our recommended boot manager. To install rEFInd, you need to disable System Integrity Protection (SIP) for the time being. This is an important security feature for macOS, so make sure you enable it again afterward.

To install the rEFInd boot manager:

  • With SIP disabled, go to Terminal from the Utilities folder in Applications (or search for it using Spotlight).
  • open Finder in a separate window and navigate to receipt download.
  • Drag files refind-install to your Terminal window and press Enter.
  • When prompted, enter your administrator password and press Enter again.
  • After installation, remember to enable SIP again.

The next time you restart your Mac, the rEFInd menu will appear automatically. If not, hold on Options on boot up to load your boot manager.

Step 3: Create an Ubuntu USB Installer

Download the latest version of Ubuntu as a disk image from the Ubuntu website. You will need to use a third party application to create a USB installer from an Ubuntu disk image. One of the simplest apps for this is ballenaEtcher, but you can use whatever you like.

To create an Ubuntu USB installer:

  • open ballenaEtcher and click Select Image.
  • Navigate to the Ubuntu disk image you downloaded and click Open.
  • Insert your USB flash drive and balenaEtcher will automatically select it. If not, click Select Target or Change to choose your own flash drive.
  • Make sure the correct drive is selected, as the next step deletes it.
  • Click Flash and enter your administrator password to remove the USB flash drive and create an Ubuntu USB installer.
  • Once done, macOS prompts you to Eject the flash drive.

Step 4: Boot Ubuntu From Your USB Installer

Restart your Mac while holding down Options and reinsert the USB flash drive directly into your computer. When the boot loader appears, use the arrow keys to select an option EFI Boot and press Enter.

The Ubuntu loading screen appears, followed by the Ubuntu desktop.

Take this opportunity to test Ubuntu on your Mac. Keep in mind that since it runs from your USB flash drive, it may be slow. Since Ubuntu can’t use your Mac’s Wi-Fi by default, use an Ethernet adapter to connect to the internet.

Disable Secure Boot on Mac With T2 Security Chip

Step 5: Install Ubuntu on your Mac

When you are ready, double click the item Install Ubuntu on the desktop.

Follow the onscreen instructions to select your language and keyboard layout. choose Normal installation and select Install third-party software. You need to connect your Mac to the internet using an Ethernet cable to install this software, which makes functions like Wi-Fi and Bluetooth work. Then click Continue.

If prompted, choose to keep your partition mounted.

Option 1: Dual Boot Ubuntu With macOS

From the screen installation type, choose Something Else and click Continue.

On the next screen, you need to identify and select the partition UBUNTU that you made. Unfortunately, there is no recognizable partition name, so search for devices with fat32 in the name that matches the partition size, measured in MB.

Double click to select it and select Use as: Ext4 journaling file system. Set Mount point to / and check the box for Format the partition. Click OK. In the popup alert, click Continue to write previous changes to disk.

Now identify the partition SWAP You, who should also be pregnant fat32. Double click and select Use as: swap area, then click OK.

Open the drop-down menu Device for boot loader installation and select partition UBUNTU You again. The name must match what you chose from the table above.

Take a moment to make sure you select the correct partition, then click Install Now. Click Continue in the popup warning to confirm that you want to write changes to the disk.

Finally, follow the onscreen instructions to select your time zone and create a user account, then wait for the installation to complete.

Option 2: Replace macOS With Ubuntu

From the screen installation type, choose Erase disk and install Ubuntu.

Be careful: this deletes everything from your Mac, including the operating system and Recovery partition!

When you’re ready, click Install Now and select your hard disk.

Follow the on-screen instructions to set the correct time zone and create a user account, then wait for the installation to complete.

Using Linux on Mac Easier

Safe! You have successfully installed Linux on your MacBook Pro, iMac, or Mac mini! If you choose to dual boot Linux on your Mac, hold down Options on boot to choose between macOS and Ubuntu.

Category: