What You Need
First, you need the OS X or macOS installer on your Mac. Ideally, download the installer, but don’t use it. When you download and use the OS X or macOS installer, the installer deletes itself as part of the installation process. If you’ve already installed OS X or macOS, redownload the installer.
After it is downloaded, the installer resides in the Applications folder. It is called “Install OS X [your version]” or “Install macOS [your version].”
You’ll also need a USB flash drive. Make sure that it has at least 12 GB of available storage and is formatted as Mac OS Extended.
It’s also important that your Mac meets the minimum requirements for the OS you’re installing. Apple’s website offers the exact system requirements for each version.
How to Use the Createinstallmedia Terminal Command
From OS X Mavericks forward, in the installer packages is a hidden command that you can enter into Terminal to create a bootable copy of the installer.
This Terminal command, called createinstallmedia, creates a bootable copy of the installer using any drive connected to your Mac. This example uses a USB flash drive. Here’s how to do it:
Locate the Mac OS installer file in the Applications folder. Plug the USB flash drive into your Mac. Change the flash drive’s name. This example calls it FlashInstaller. Double-click the drive’s name to select it and then type in the new name. Rapid double-clicking the name of a drive can open that drive in a window on Finder, so if this step isn’t working for you, try clicking once on the file name, pausing for a second, and then clicking a second time. Launch Terminal, located in Applications/Utilities. Alternatively, enter Terminal into Spotlight Search to quickly start up the utility. In the Terminal window that opens, enter one of the following commands, depending on which OS X or macOS installer you’re working with. Note that they use the example name FlashInstaller for our USB drive, so if you named your drive something else, use that name. For macOS Catalina: sudo /Applications/Install\ macOS\ Catalina. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller For macOS Mojave: sudo /Applications/Install\ macOS\ Mojave. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller For macOS High Sierra: sudo /Applications/Install\ macOS\ High\ Sierra. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller For OS X El Capitan sudo /Applications/Install\ OS\ X\ El\ Capitan. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller –applicationpath /Applications/Install\ OS\ X\ El\ Capitan. app For OS X Yosemite: sudo /Applications/Install\ OS\ X\ Yosemite. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller –applicationpath /Applications/Install\ OS\ X\ Yosemite. app –nointeraction For OS X Mavericks: sudo /Applications/Install\ OS\ X\ Mavericks. app/Contents/Resources/createinstallmedia –volume /Volumes/FlashInstaller –applicationpath /Applications/Install\ OS\ X\ Mavericks. app –nointeraction After you enter the command, press Return. When prompted, type your administrator password and press Return again. Terminal doesn’t show any characters as you type your password. When prompted, type Y to confirm that you want to erase the volume and then press Return. Terminal shows the progress as the bootable installer is created. When Terminal is finished, the volume has the same name as the installer you downloaded, such as Install macOS Catalina. Quit Terminal and eject the volume. You now have a bootable installer for your OS X or macOS version.
For macOS Catalina:
For macOS Mojave:
For macOS High Sierra:
For OS X El Capitan
For OS X Yosemite:
For OS X Mavericks: