Instructions derived from https://support.apple.com/en-us/HT201372
We’ll be using terminal and the createinstallmedia command:
Download the macOS Sierra installer
Launch the App Store app, then look for macOS Sierra in the store. (Here’s a link.) Click on the Download button, and your Mac will download the installer to your Applications folder. If it automatically launches after download, quit the installer.
Download the macOS installer from the Mac App Store. Quit the installer if it opens automatically after downloading. The installer will be in your Applications folder.
Mount your USB flash drive or other volume. You could also use a secondary internal partition.
Open the Terminal app, which is in the Utilities folder of your Applications folder.
Use the createinstallmedia command in Terminal to create the bootable installer. For detailed usage instructions, make sure that the appropriate macOS installer is in your Applications folder, then enter one of the following paths in Terminal:
Path for Sierra:
/Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia
Path for El Capitan:
/Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia
Path for Yosemite:
/Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia
Path for Mavericks:
/Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia
This is the basic syntax of the command. Replace volumepath with the path to your USB flash drive or other volume, and replace installerpath with the path to the Install OS X app.
createinstallmedia –volume volumepath –applicationpath installerpath
The following examples assume that the OS X installer is in your Applications folder and the name of your USB flash drive or other volume is MyVolume:
Example for Sierra:
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia –volume /Volumes/MyVolume –applicationpath /Applications/Install\ macOS\ Sierra.app
Example for El Capitan:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia –volume /Volumes/MyVolume –applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Example for Yosemite:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia –volume /Volumes/MyVolume –applicationpath /Applications/Install\ OS\ X\ Yosemite.app
Example for Mavericks:
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia –volum