Command Line to Create USB OSX Stick

As many people are aware creating a USB installer for OSX is ideal for any IT Engineer.  I have spent many hours searching for the terminal command to create a USB Bootable memory stick.

To simplify I am assuming you know what terminal is,you have a USB stick (8GB or more), have formatted it to untiled in disk utility and finally downloaded the latest version of the Mac OS you want an installer for.  All you need is the terminal command to run the installer to create the USB Installer.

Point to note, make sure the USB drive is 8GB or more and your happy to have it erased before you proceed.  You will need the admin password in Terminal to run the command,  each installer does take while to create to be patient.

Well here they are:

10.9 Mavericks

sudo /Applications/Install OS X --volume /Volumes/Untitled --applicationpath /Applications/Install OS X --nointeraction

Update, Have just tried this with a new installer from the App store and it did not work.  The command line below does work with the new installer from the app store. May 2017

sudo /Applications/Install\ OS\ X\ –volume /Volumes/Untitled –applicationpath /Applications/Install\ OS\ X\ –nointeraction

10.10 Yosemite

sudo /Applications/Install\ OS\ X\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ --nointeraction

10.11 El Capitan

sudo /Applications/Install\ OS\ X\ El\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\

10.12 MacOS Sierra

sudo /Applications/Install macOS --volume /Volumes/Untitled --applicationpath /Applications/Install macOS --nointeraction

Note: again tried the above command (from apple) and it does not work.  same as mavericks if you google it you will encounter a number of terminal commands which might help.

however I have just run this amended terminal command and we are in business as I this my pen stick in installing 10.12.4  hope it helps

sudo /Applications/Install\ macOS\ –volume /Volumes/Untitled –applicationpath /Applications/Install\ macOS\ –nointeraction

Thanks. May 2017

I have enclosed a link to the Apple support page click here.

Just tried the latest version of the OS Aug 2018 and here is High Serra.

sudo /Applications/Install\ macOS\ High\ –volume /Volumes/MyVolume –applicationpath /Applications/Install\ macOS\ High\