How to create an OS X bootable installation media (You need to download OS X from the Mac App Store)

Here is the command to use in the Terminal.

sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction