Quick Links

Key Takeaways

  • If you have an Apple silicon Mac, you can either install Asahi Linux or run Linux on a virtual machine.
  • Make sure to back up your Mac before attempting to install Linux.
  • To boot Linux from your external media on a Mac, you'll need to disable some security features in macOS first.

If you feel like your Mac is slowing down with updates and are frustrated with Apple's walled garden, it's time for a change. You can breathe new life into your Mac by installing Linux, and we're here to show you exactly how to do that.

Before You Run Linux on an Apple Silicon Mac

If you have an Apple silicon Mac, know that you can't just grab a USB flash drive and install any Linux distribution of your choice.

As of this writing, your only option is to install Asahi Linux on your Mac, which is still in active development and lacks a lot of crucial features like Thunderbolt support. Plus, it's not compatible with M3 Macs yet.

If you want a more stable solution, you can install and run Linux using Parallels Desktop, but this method comes with a performance hit as you're running Linux on a virtual machine.

For everyone else, we'll explain how to dual-boot Linux on Intel-based Macs below.

Step 1: Prepare Your Mac for Installing Linux

To install Linux on your Mac, you need a USB flash drive with at least 2GB of storage. You'll erase the flash drive in a future step to put an Ubuntu installer on it, so make sure you've backed 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 in Ubuntu without third-party drivers. Similarly, desktop Mac users should get hold of 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 the Apple menu and go to System Setting > General > Storage to check that you have at least 25GB of space (but preferably more).

macOS System Settings menu showing the Storage section

Finally, make a backup of your Mac. You won't lose data by installing Linux in a dual boot partition. However, if something goes wrong, you may need to erase your entire Mac to fix it.

If you plan to replace macOS with Linux rather than creating a dual-boot system, use a service like Carbon Copy Cloner to back up your macOS Recovery partition. This will make it far easier to revert to macOS again 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 drive. If you don't want to create a dual boot system, skip to the next section.

In fact, to dual-boot Linux on a Mac, you need two extra partitions: one for Linux and a second for swap space. Ideally, you should set the swap partition to about half the RAM your Mac has. You can check how much memory you have by clicking on the Apple logo in the menu bar and choosing About This Mac from the dropdown.

You can use Disk Utility to create new partitions on your Mac by following these steps:

  1. Open Disk Utility from the Applications > Utilities folder in Finder. Alternatively, you can use Spotlight search on your Mac to find it.
  2. In the top-left corner, select View > Show All Devices.
  3. Select the highest-level drive on your Mac, then click Partition.
    macOS Disk Utility
  4. Use the plus (+) button to create a new partition and click Add Partition. Name it UBUNTU and set the format to MS-DOS (FAT32). Give it as much space as you want to use for Linux.
  5. Click Apply to create the partition.
    macOS Disk Utility Create Partitions Menu
  6. Repeat the steps above to create another partition. Name this partition SWAP and set the format to MS-DOS (FAT) again. Make the size match half the amount of RAM in your Mac—for example, 4GB, 8GB, or more.
  7. Click Apply to create the partition.

If you can't create new partitions, it could be because FileVault is encrypting your Mac's drive. Go to System Settings > Network > 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 need to install a third-party boot manager instead, which will let you easily choose between macOS or Linux when you start your computer.

Therefore, your next step is to download rEFInd, which is the boot manager we recommend. To install rEFInd, you need to temporarily disable System Integrity Protection in macOS. This is an important security feature, so make sure you re-enable it after.

To install the rEFInd boot manager, follow these steps:

  1. With SIP disabled, open Terminal from Applications > Utilities in Finder (or search for it using Spotlight).
  2. Open Finder in a separate window and navigate to the rEFInd download.
  3. Drag the refind-install file into your Terminal window and press Return (or Enter).
  4. When prompted, enter your administrator password and press Return again.
    macOS terminal running the rEFInd setup
  5. After the installation, remember to enable SIP again.

Next time you restart your Mac, the rEFInd menu should appear automatically. But if it doesn't, hold Option while booting 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 need to use a third-party app to create a USB installer from the Ubuntu disk image. One of the simplest apps for this is Etcher, but you can use anything you like.

To create an Ubuntu USB installer with balenaEtcher:

  1. Open Etcher and click Select Image.
  2. Navigate to the Ubuntu disk image you downloaded and click Open.
  3. Insert your USB flash drive, and Etcher should automatically select it. If it doesn't, click Select Target or Change to manually select the flash drive.
  4. Make sure the correct drive is selected since the next step erases it.
  5. Click Flash and enter your administrator password to erase the USB flash drive and create an Ubuntu USB installer. Once the flashing process is complete, you'll get a prompt to Eject the flash drive.
balenaEtcher window ready to create an Ubuntu USB installer

Step 4: Allow Booting From an External Drive

If you own an Intel Mac made between 2018 and 2020, it likely has a T2 security chip. This can cause problems when booting from a USB drive. To solve this, you'll need to take some extra steps. You can ignore this part if your Mac doesn't have a T2 chip.

  1. Turn on your Mac while holding Command + R, and release the keys as soon as you see the Apple logo. This will boot you into macOS Recovery.
  2. Enter the password for a user you have access to. Keep in mind that it should be an administrator account.
  3. Select Utilities > Startup Security Utility from the menu bar. You'll once again be prompted to enter your administrator password.
  4. Under Secure Boot, select the No Security option, and under Allowed Boot Media, select Allow booting from external or removable media.
    macOS Startup Security Utility

Step 5: Boot Ubuntu From Your USB Installer

Restart your Mac while holding the Option key and reinsert the USB flash drive directly into your computer. When the boot loader appears, use the arrow keys to select the Ubuntu Boot EFI option and hit Return (or Enter).

rEFInd Boot Manager With Options to boot from Windows or Ubuntu

An Ubuntu loading screen appears, followed by the Ubuntu desktop. Use this opportunity to test Ubuntu on your Mac. Note that because Ubuntu is running 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.

Ubuntu Desktop

Step 6: Install Ubuntu on Your Mac

When you're ready, double-click the Install Ubuntu item on the desktop.

Follow the on-screen prompts to choose your language and keyboard layout. Select Normal installation and check the box next to 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.

Ubuntu Installer Installation Type Menu

If prompted, choose to keep your partitions mounted.

Option 1: Dual Boot Ubuntu With macOS

From the Installation type screen, select Something Else and click Continue. On the next screen, you need to identify and select the UBUNTU partition you created. Unfortunately, there are no recognizable partition names, so look for a device with fat32 in the name that matches the partition size in MB.

Ubuntu Installer Disk Partitions Menu

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

Now, identify your SWAP partition, which should also have fat32 in the name. Double-click it and choose to Use as: swap area, then click OK. Open the Device for boot loader installation dropdown menu and select your UBUNTU partition again. The name should match what you selected for it from the table above.

Take a moment to ensure you selected the correct partitions, then click Install Now. Click Continue in the popup alert to confirm you want to write changes to those disks. Finally, follow the on-screen prompts to choose your time zone and create a user account, then wait for the installation to complete.

Option 2: Replace macOS With Ubuntu

From the Installation type screen, select Erase disk and install Ubuntu.

Installation type for Ubuntu

This erases everything from your Mac, including the operating system and the recovery partition!

When you're ready, click Install Now and select your disk. Follow the on-screen prompts to set the correct time zone and create a user account, then wait for the installation to complete.

You've now installed Linux on your Mac successfully! If you have an older Mac that no longer receives macOS updates from Apple, we highly suggest making this switch. Ubuntu or other popular Linux distributions will breathe new life into your old Mac, as you'll get optimal performance even on outdated hardware.

Although dual booting is unlikely to affect the data on your macOS partition, we strongly recommend backing up your Mac before installing Linux.