A lot of users prefer Mac over other devices due to the quality of its hardware components. However, apart from robust software, the default macOS does not have any other advantages over other operating systems. It lacks enough flexibility and customization tools for users to personalize their working environment.
If you are looking for a more flexible system, it is possible to install Linux on your Mac. It is an open-source operating system where there’s no end to what you can possibly do. Installing Linux is especially suitable for older Mac devices whose macOS no longer receive support from Apple.
You can either replace the macOS with Linux or dual-boot Linux together with macOS on the Mac.
Table of Contents
How to Install Linux on Mac as a Single-Boot Option?
Before you begin, you should know that you can only install a Linux OS on a Mac device with an Intel processor. For other devices, you can only use a virtualization app to use Linux as a virtual machine.
If you have an appropriate Mac device, go through the step-by-step guide below to install Linux on the computer. But first, make sure you have backed up all your data as this process will delete all the data on the device.
Check Compatibility With Linux
Most Mac devices allow installing even the latest versions of Linux distros. However, older hardware may not support the latest operating system. In such cases, you need to look for a compatible version.
First, note down your Mac hardware model. If you don’t know,
- Open the Mac terminal.
- Enter the command
Now, open a web browser and visit the Linux distros’ official website to check the compatibility with the device. If you want to install Ubuntu on Mac, you can find the necessary information on the Mactel Support Community Help Page.
Create Bootable USB Drive
Now that you know which Linux version to install, you can move on to creating the installation drive. Here’s how you can do so on Mac:
- Download the latest version of the compatible Linux distros from its official website. It should be an
- Download and install a USB flashing app. We are going to use the balenaEtcher as an example. Make sure to download the installer for your operating system (macOS if you are creating the bootable drive on a Mac device).
- Insert the USB drive you wish to use as the installation media on your computer.
- Open the balenaEtcher app and click Flash from file.
- Navigate to the
.isofile of the Linux OS and select it. Then, click OK.
- Click Select target and check your USB drive. Then, click Select.
- Now hit Flash to initiate the process.
- Enter your credentials if necessary. Also, provide permission when prompted.
- After it is complete, your device cannot read the USB drive. Select either Eject or Ignore.
This process may fail sometimes. You only need to try again in such cases.
Disable Secure Boot
The Mac devices with Apple T2 security chip include the option to enable secure boot in their Startup Security Utility. If you enable the secure boot or disallow booting from external media in such a setting, you can’t install Linux on the Mac. So you need to disable it using the steps below:
- Power up or restart the Mac whose OS you wish to change. As soon as you see the Apple logo, press and hold Command + R to boot in Recovery mode.
- Select your user account and then hit Next. Then, enter your password.
- On the macOS utilities windows, go to Utilities > Startup Security Utility.
- Enter your admin username and password when prompted.
- Check No Security under Secure boot and Allow booting from external or removable media under Allowed Boot media or External Boot.
- Restart your Mac to boot in normal mode.
Install Linux OS
The final step is to install the Linux OS on your Mac. Here, we use the Linux distro, Ubuntu as an example. Other distros also follow a similar process which you can easily follow. You can visit their official websites if you encounter any issues.
- Insert the bootable drive into the Mac device where you want to install Linux.
- Power up the Mac device or restart it. As soon as it starts booting, press and hold the Option (Alt) key until you get to the boot menu.
- Select USB drive using the arrow keys and press Enter.
- After you boot to the USB drive, set your language preference.
- Select the option to install Linux on your device. For Ubuntu, you need to select Install Ubuntu.
- Set your language and keyboard preference and click Continue.
- Check Normal installation as well as Install third-party software… and hit Continue.
- Make sure your Mac is connected to the internet through an Ethernet cable for the installer to install the third-party apps. If your Mac doesn’t have an Ethernet port you can use Ethernet-to-USB adapter and connect it to the USB port.
- On Installation type, check Erase disk and install Ubuntu and click Install Now.
- Follow the on-screen instructions.
- After installing the OS, your PC restarts. Then, go through the initial profile setup including your location as well as your user account.
Additionally, you need to install some necessary drivers after installing Linux to properly use your hardware components. You need to check the documentation of your Mac device to look for the hardware and install their corresponding drivers through their official websites.
How to Dual Boot Linux and macOS on Mac?
As with installing Linux as a single OS on Mac, there’s no change to the hardware components while dual booting Linux and macOS. So, you also need to check for the compatibility of the Linux OS with your device for this method. You can use the same steps as above to do so.
Installing a Windows OS together with macOS is very easy as you can use the Boot Camp Assistant for this purpose. However, this utility doesn’t properly support Linux and you may encounter many issues while trying to do so.
So we recommend manually performing the process using the step-by-step guide below.
Install Boot Manager
Mac does come with a built-in boot manager. However, this manager does not properly support all distros of Linux, so we recommend installing a third-party EFI Boot Manager on your system first.
You need a boot manager to choose which OS to boot into after powering up your Mac. You can use any EFI Boot Manager you want, however, we use rEFIt in this guide.
- Install rEFIt while following the SourceForge documentation for macOS.
- Restart your computer twice after installing it and check if the rEFIt menu appears.
- If it doesn’t try installing again.
Partition Primary Disk and Create Bootable USB Flash Drive
The next step is to create a separate partition for the Linux OS. You can also create a bootable Linux drive at the same time as you may need to reformat the drive to a different file system and both processes use the same utility.
Here’s what you need to do:
- Insert a USB Flash drive into your Mac.
- Press Command + Spacebar to open the Spotlight search.
- Search for Disk Utility and open the application.
- On the menu, click View > Show All Devices.
- Select the USB drive and click Erase.
- Set the Name as your wish and the Format to MS_DOS (FAT).
- Click Erase and then Done after the process completes.
- Select the hard drive or storage drive (Machintosh HD is usually the partition under this drive).
- Click Partition and then the + button.
- Set the Partition size you want for the Linux OS.
- Set the Name to your choice and Format to MS-DOS (FAT).
- Click Apply > Continue > Continue and then Done after the partitioning is complete.
We also recommend creating a SWAP partition to act as the overflow space for RAM. You don’t need to do so if you have sufficient RAM on your system. You can create the partition with about 1GB to your RAM size using the same steps as above. Make sure the Format is MS-DOS (FAT).
After that, install bootable Linux OS on the USB drive using balenaEtcher (follow the steps from the above method) and disable secure boot as well.
Install Linux OS on Separate Partition
The process to install Linux OS on a separate partition is similar to that for replacing macOS with Linux. For Ubuntu, you need to follow the same steps till you reach the Installation type screen. Then,
- Check Something Else and go to Continue.
- Search for the main partition you just created to install Linux (FAT32 file system) and double-click on it.
- Set Use as to Ext4 journaling file system and then Mount point to a forward slash “
/” without the quotes.
- Check Format the partition and click OK > Continue.
- Then, search for the SWAP partition and double-click on it as well.
- Set Use as to swap area and click OK.
- Under Device for boot loader installation, set your main partition for Linux (now ext4 file system) on the drop-down box.
- Click Install now and then Continue.
- After installing the OS, reboot your computer and to the rEFIt menu.
- It should ask you if you would like to sync your partition tables. Confirm the choice and then wait for the process to complete.
- After that, shut down the Mac (not restart) and power it up again.
Boot into Linux from the rEFIt menu and go through the initial setup process. As with the above case, you may need to install the necessary drivers and software. So, visit the Linux distros’ official website to figure out what you need to do.