Find out how to Set up and Twin Boot Linux on Your Mac

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 (it's used to run everything from smartphones to supercomputers), and you can install it on your MacBook Pro, iMac, or even your Mac mini.

Linux MacBook Pro Retina

Apple's addition of Boot Camp to macOS made it easy for users to double-boot Windows, but installing Linux is an entirely different matter. Follow the steps below to learn how to do this.

Why install Linux on a Mac or MacBook Pro?

Your Mac offers great performance, great battery life, and a long life. The hardware on a Mac is hard to find, which makes it an incredibly powerful computer for Linux.

In addition, Linux breathes life into old Macs that are no longer suitable for macOS updates. Instead of turning your old MacBook Pro into an expensive paperweight, install the latest version of Linux and keep it going for years.

Ubuntu is our Linux distribution of choice

There are many different versions of Linux out there, but for the purposes of this tutorial, we recommend installing Ubuntu on your Mac. Ubuntu is the most popular Linux distribution, which means there are plenty of active support communities available in case you ever need help.

We even wrote an in-depth beginner's guide to Ubuntu to get you started.

Ubtuntu guide feature

Ubuntu: A Beginners Guide

Curious about Ubuntu but not sure where to start? Everything you could possibly need to get started with the latest version of Ubuntu is here in easy to understand, plain English.

For dual boot or not for dual boot

With a dual boot system, both macOS and Linux are installed on your Mac. Stop possibility while your computer is starting to select the operating system to use. The main difference between a dual-boot system and a virtual machine is that dual-booting allows you to use only one operating system at a time, but it performs better.

If you don't plan on ever using macOS again, you may want to replace it entirely with Linux instead. In this way, no space is taken up by the system files.

However, if you ever change your mind, it will be difficult and time consuming to restore macOS in the future. This is especially true since Linux writes over the macOS recovery partition.

For this reason, we recommend dual booting Linux on your Mac. If you're really sure you don't want this, just skip that Partition Step in the instructions below.

Step 1: Prepare your Mac to install Linux

To install Linux on your Mac, you need a USB flash drive with at least 2 GB of space. You will erase the flash drive in a future step in order to install an Ubuntu installer on it. So make sure you have backed up all your important files first.

Use an Ethernet adapter to connect your Mac to the internet. This is important because your WiFi may not work in Ubuntu without third-party drivers. Likewise, iMac users should purchase a USB keyboard or mouse in case Bluetooth does not work.

If you want to dual boot your Mac on Linux, you also need to make sure you have enough free space. Go to Apple menu> About This Mac> Storage to check that you have at least 25 GB free (but preferably more).

Mac storage information

Finally, take a backup of your Mac. You shouldn't lose any data when installing Linux on a dual-boot partition. However, if something goes wrong, you might have to erase your entire Mac to fix the problem.

If you want 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 come back to macOS in the future.

Step 2: Create a partition on your Mac Drive

Disk Utility window with Linux and swap partitions for dual boot on Mac

For a dual boot system (which we strongly recommend), you need to create a Linux partition on your Mac's hard drive. If you do not want to create a dual-boot system, proceed to the next step.

To dual boot Linux on a Mac, you need two additional partitions: one for Linux and a second for swap space. The swap partition must be as big as your Mac's RAM. Check this out by going to Apple menu> About This Mac.

Use Disk Utility to create new partitions on your Mac:

  1. to open Disk utility in the Utilities folder in your applications, or search for it through Spotlight.

  2. Select in the upper left corner View> Show all devices.

  3. Select the top-level drive for your Mac hard drive and click Partition.

  4. Use the plus Button to create a new partition. Name it UBUNTU and set the format to MS-DOS (FAT). Give it as much space as you want to use for Linux.

    Information about the Ubuntu partition in Disk Utility

  5. click Apply to create the partition.

  6. Repeat the above steps to create another partition. Name this partition TO DECEIVE and set the format to MS-DOS (FAT) once again. Adjust the size to match the size of your Mac's RAM. This can be, for example, 4 GB or 8 GB.

  7. click Apply to create the partition.

If you cannot create new partitions, it may be because FileVault is encrypting your hard drive. Go to System Preferences> Security & Privacy> FileVault to turn it off.

Install rEFInd for better startup options

Boot the EFI option via the rEFInd boot manager

The default boot manager on your Mac doesn't always work with Ubuntu. This means that instead, you'll need to install a third-party boot manager that allows you to easily choose between macOS and Linux when you start your computer.

So your next step is to download rEFInd, which is the boot manager we recommend. To install rEFInd, you must temporarily turn off System Integrity Protection. This is an important security feature for macOS. So make sure to activate it again afterwards.

How to install the rEFInd boot manager:

  1. With SIP disabled, open terminal from the Utilities folder in Applications (or search for it using Spotlight).

  2. to open finder in a separate window and navigate to rEFInd download.

  3. Pull the reinstall File in your terminal window and press Enter.

  4. When prompted, enter your administrator password and press Enter once again.

  5. After installing, remember to re-enable SIP.

Delete the refind install file in the terminal window with the code displayed

The next time you restart your Mac, the rEFInd menu should appear automatically. If not, hold on possibility during boot 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'll need to use a third-party app to create a USB installer from the Ubuntu image. One of the easiest apps for this is balenaEtcher, but you can use anything you want.

To create an Ubuntu USB installer:

  1. to open balenaEtcher and click on choose picture.

  2. Navigate to the downloaded Ubuntu image and click to open.

  3. Connect your USB flash drive and balenaEtcher should select it automatically. If not, click Choose a destination or change to select the flash drive itself.

  4. Make sure the correct drive is selected as it will be deleted in the next step.

  5. click lightning and enter your administrator password to erase the USB flash drive and create an Ubuntu USB installer.

  6. When it's done, macOS will prompt you to do so Eject the flash drive.

balenaEtcher window for creating an Ubuntu USB installer

Step 4: Launch Ubuntu from your USB installer

Restart your Mac while holding down possibility and plug the USB flash drive back into your computer directly. When the boot loader is displayed, use the arrow keys to select the Start EFI Option and press Enter.

An Ubuntu loading screen will appear, followed by the Ubuntu desktop.

Ubuntu desktop with Install Ubuntu Disk Image

Take this opportunity to try Ubuntu on your Mac. Note that it may be slow as it is being executed from your USB key. Since Ubuntu can't use your Mac's WiFi by default, use an Ethernet adapter to connect to the internet.

Disable Safe Boot on Macs with the T2 security chip

In 2018, Apple introduced the T2 security chip for new Macs. This further development may prevent you from starting other operating systems on your computer. If you have trouble starting up, follow Apple's instructions to disable the T2 chip.

Step 5: Install Ubuntu on your Mac

When you're done, double-click Install Ubuntu Item on the desktop.

Follow the on-screen instructions to choose your language and keyboard layout. Choose a Normal installation and select the option to Install third-party software. You need to connect your Mac to the internet with an ethernet cable in order to install this software, which works with features like Wi-Fi and Bluetooth. Then click Continue.

Normal Ubuntu installation with selected third-party software

When prompted, leave your partitions mounted.

Option 1: Dual Boot Ubuntu with macOS

Of the Installation type Select screen Something else and click on Continue.

On the next screen, you'll need to identify and select those UBUNTU Partition you created. Unfortunately no partition names are recognizable. So look for a device with fat32 in the name corresponding to the partition size, measured in MB.

"Ubuntu Installation Type" window for selecting fat32 partitions

Double click to select and choose it Use as: Ext4 journaling file system. Set the Mount point to /. and check the box too Format the partition. click OK. In the warning pop-up, click Continue to write previous changes to disk.

Now identify your SWAP partition, which should also have fat32 in the name of. Double click on it and select Use as: swap space, then click OK.

Open that Device for installing the bootloader Drop-down menu and select your UBUNTU partition again. The name should match the one you chose from the table above.

Take a moment to make sure you have selected the correct partitions, then click Install now. click Continue in the pop-up warning to confirm that you want to write changes to these media.

Finally, follow the on-screen instructions to select your time zone and create a user account. Then wait for the installation to complete.

Option 2: replace macOS with Ubuntu

Of the Installation type Select screen Erase the hard drive and install Ubuntu.

Be warned: This will erase everything from your Mac including the operating system and the recovery partition!

Erase the hard drive and install the Ubuntu option

When you're done, click Install now and choose your hard drive.

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

Make using Linux on Mac even easier

Congratulations! You have successfully installed Linux on your MacBook Pro, iMac, or Mac mini! If you want to dual boot Linux on your Mac, press and hold possibility When booting, you can choose between macOS and Ubuntu.

Next, check out some tips to make the transition from macOS to Linux easier. When you add some familiar macOS features to Ubuntu, you'll have the most of Linux on your Mac in no time!

dangerous android apps

10 popular Android apps that you should NOT install

These Android apps are very popular, but they also put your security and privacy at risk. If you have them installed you will want to uninstall them after reading.

About the author

Dan Helyer
(161 articles published)

Dan writes tutorials and troubleshooting guides to help people get the most out of their technology. Before becoming a writer, he earned a BSc in audio technology, oversaw repairs at an Apple store, and even taught English in China.

More from Dan Helyer

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!

One more step …!

Please confirm your email address in the email we just sent you.

. "border =" 0

Leave a Reply

Your email address will not be published. Required fields are marked *