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.
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.
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).
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
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:
to open Disk utility in the Utilities folder in your applications, or search for it through Spotlight.
Select in the upper left corner View> Show all devices.
Select the top-level drive for your Mac hard drive and click Partition.
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.
click Apply to create the partition.
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.
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
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:
With SIP disabled, open terminal from the Utilities folder in Applications (or search for it using Spotlight).
to open finder in a separate window and navigate to rEFInd download.
Pull the reinstall File in your terminal window and press Enter.
When prompted, enter your administrator password and press Enter once again.
After installing, remember to re-enable SIP.
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:
to open balenaEtcher and click on choose picture.
Navigate to the downloaded Ubuntu image and click to open.
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.
Make sure the correct drive is selected as it will be deleted in the next step.
click lightning and enter your administrator password to erase the USB flash drive and create an Ubuntu USB installer.
When it's done, macOS will prompt you to do so Eject the flash drive.
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.
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.
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.
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!
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!
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
(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.