How to Create a Bootable macOS USB Installer using the Terminal

Introduction

While macOS can be reinstalled over the internet using macOS Recovery, having a physical, bootable USB installer is vastly superior. A USB installer is faster, doesn’t rely on a stable internet connection during the installation phase, and allows you to install macOS on multiple machines quickly. It is also the only reliable way to downgrade to an older version of macOS. This guide explains how to create a bootable installer using the built-in createinstallmedia Terminal command.

Prerequisites

You need a Mac, a USB flash drive with at least 16GB of storage (formatted as Mac OS Extended), and the installer application for the macOS version you want to use.

Step 1: Download the macOS Installer

You must download the full installer application, not just an update delta.

  1. Open the Mac App Store and search for the macOS version you want (e.g., Sonoma, Ventura, Monterey).
  2. Click Get to download the installer.
  3. When the download finishes, the installer will launch automatically. Do not click Continue. Quit the installer by pressing Cmd + Q.
  4. Open your Applications folder and verify that an app named something like “Install macOS Sonoma” is present.

Step 2: Format the USB Drive

Warning: This process will erase everything on the USB drive.

  1. Connect the USB drive to your Mac.
  2. Open Disk Utility (Applications > Utilities).
  3. Select the USB drive in the left sidebar (ensure you select the physical drive, not just a volume beneath it).
  4. Click Erase. Name the drive exactly MyVolume (this makes the Terminal command easier later).
  5. Set the Format to Mac OS Extended (Journaled) and the Scheme to GUID Partition Map.
  6. Click Erase, wait for it to finish, and close Disk Utility.

Step 3: Run the `createinstallmedia` Command

Open Terminal (Applications > Utilities). You must use the createinstallmedia tool hidden inside the installer app you downloaded in Step 1. Copy and paste the command corresponding to your downloaded OS. Assume the USB drive is named MyVolume.

For macOS Sonoma:

sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

For macOS Ventura:

sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Press Enter. You will be prompted to type your Mac’s administrator password (the characters will not appear on screen as you type). Press Enter again.

Step 4: Confirm and Wait

Terminal will warn you that it is about to erase the volume. Type Y and press Enter. The tool will format the disk (again), copy the necessary installation files, and make the disk bootable. This process can take anywhere from 10 to 45 minutes depending on the speed of the USB drive. Wait until Terminal prints “Install media now available” and returns to the standard prompt.

Step 5: Booting from the USB Drive

How you boot from the drive depends on your Mac’s architecture:

  • Apple Silicon (M1/M2/M3): Shut down the Mac. Press and hold the power button until you see “Loading startup options.” Select the USB installer.
  • Intel Macs: Shut down the Mac. Turn it on and immediately press and hold the Option (Alt) key until the Startup Manager appears. Select the USB installer.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.