sodcalculator

10 Tech How-To

How to Install Linux on a Mac

Guide 10-48659 · Updated · Step by step

This guide walks you through installing Linux on a Mac, whether you want to dual-boot alongside macOS or replace it entirely. You’ll learn the safest method using a USB drive, how to partition your disk, and how to troubleshoot common issues. No prior Linux experience is needed, but you should back up your data before starting.

What You’ll Need

  • A Mac with an Intel processor (Apple Silicon Macs are covered in the FAQ).
  • A USB flash drive with at least 8 GB of storage.
  • A Linux distribution ISO file (Ubuntu and Linux Mint are good starting points).
  • An internet connection to download the ISO and tools.
  • About 20 GB of free disk space if you plan to dual-boot.

Step-by-Step

  1. Back up your Mac. Use Time Machine or clone your drive to an external disk. Partitioning and installing Linux carry a small risk of data loss, so this step is non-negotiable.
  2. Download a Linux distribution. Go to the official website of your chosen distro (e.g., ubuntu.com) and download the desktop ISO file. Choose the 64-bit version.
  3. Create a bootable USB drive. On macOS, open Disk Utility, select your USB drive, and erase it as “MS-DOS (FAT)” with GUID Partition Map. Then use a tool like Etcher or balenaEtcher (free) to flash the ISO to the USB drive. This will overwrite the USB drive’s contents.
  4. Partition your Mac’s internal drive (for dual-boot only). Open Disk Utility, select your internal drive, and click Partition. Click the + button to add a new partition. Size it to at least 20 GB, name it “Linux”, and set the format to “Mac OS Extended (Journaled)”. Click Apply. If you plan to replace macOS entirely, skip this step.
  5. Restart your Mac and hold the Option (Alt) key. Keep holding it until you see the Startup Manager, which shows bootable drives.
  6. Select the USB drive. It will appear with an orange icon labeled “EFI Boot” or similar. Use the arrow keys to select it and press Return.
  7. Choose “Try Linux” or “Install Linux”. The first option lets you test the system without changes; the second starts the installer. For a first install, choose “Try” to verify everything works, then launch the installer from the desktop.
  8. Follow the installer’s prompts. Select your language, keyboard layout, and time zone. When asked about installation type, choose “Install Linux alongside macOS” if you partitioned earlier. If you want to replace macOS, select “Erase disk and install Linux” (this will delete everything).
  9. Create your user account. Set a username, password, and computer name. Remember these credentials.
  10. Complete the installation. The installer will copy files and install the bootloader. When done, remove the USB drive and restart.
  11. Select the OS at boot. After restart, you’ll see a boot menu (GRUB). Choose Linux to boot into it, or macOS to go back to Apple’s system.

Common Mistakes

  • Skipping the backup. Partitioning errors or a failed install can wipe your data.
  • Using the wrong USB format. macOS’s default format (APFS) won’t boot on most Linux ISOs. Use FAT32 or let Etcher handle it.
  • Choosing “Erase disk” when you meant to dual-boot. Double-check the installer’s wording before clicking.
  • Not holding Option long enough. If you miss the Startup Manager, you’ll boot back into macOS.
  • Installing on Apple Silicon Macs without checking compatibility. Most standard distros won’t boot on M1/M2/M3 Macs.

Tips

  • Use a wired internet connection during installation to avoid Wi-Fi driver issues.
  • Choose a beginner-friendly distro like Ubuntu or Linux Mint for your first install.
  • Keep the USB drive handy; you may need it for recovery.
  • After installing, run sudo apt update && sudo apt upgrade (on Ubuntu) to get the latest security patches.
  • If you dual-boot, set your default OS in System Preferences > Startup Disk (on macOS) or in GRUB settings (on Linux).

Troubleshooting

Mac boots straight to macOS, ignoring the USB. Check that the USB is formatted correctly and re-flash it. Try a different USB port (preferably one on the left side). Also, disable Secure Boot if your Mac has it (in Startup Security Utility, accessible by holding Command+R at boot).

Installer doesn’t see the partition you created. The partition format may be incompatible. In the installer, choose “Something else” and manually select the free space. You can delete the partition you made and create an ext4 partition there.

Linux installs but won’t boot. This often happens on Macs with T2 chips. In the Startup Security Utility, set “Allow booting from external or removable media” and set “Secure Boot” to “No Security”. You may also need to run sudo update-grub from a live USB.

No Wi-Fi after install. Many Macs need proprietary drivers. Connect via Ethernet, then run sudo ubuntu-drivers autoinstall (on Ubuntu). For other distros, search for your Mac model’s wireless chipset.

Keyboard or trackpad not working. This is rare but can happen with older Macs. Try adding i8042.nopnp to the kernel boot parameters (in GRUB, press ‘e’ to edit, add it to the ‘linux’ line, then Ctrl+X to boot).

Can’t get back to macOS after installing Linux. Restart and hold Option to see if macOS still appears. If not, use the macOS Recovery (hold Command+R) and reinstall macOS, then restore from Time Machine.

Frequently Asked Questions

Can I install Linux on an Apple Silicon (M1/M2/M3) Mac? Yes, but only with special builds like Asahi Linux. Standard Ubuntu or Mint won’t work. The process is more complex and involves a different bootloader. Check the Asahi Linux website for current compatibility and instructions.

Will Linux run faster than macOS on my Mac? It can, especially on older hardware, because Linux is lighter. However, driver support and battery life may be worse, so it’s not always a clear win.

Can I run Linux without installing it? Yes, the “Try Linux” option runs entirely from the USB drive. Your Mac’s hard drive is untouched. It’s slower, but great for testing.

How do I remove Linux and get my disk space back? Boot into macOS Recovery (hold Command+R), open Disk Utility, and delete the Linux partition. Then resize your macOS partition to reclaim the space. If Linux replaced macOS, you’ll need to reinstall macOS from Recovery.

Will installing Linux void my Mac’s warranty? No, but if you cause hardware damage (unlikely), Apple may not cover it. Software changes are generally fine.

Can I access my macOS files from Linux? Yes. Linux can read and write to HFS+ and APFS (read-only for APFS) partitions. You can mount them in the file manager, but be careful not to modify system files.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →