sudo dd if=/path/to/your.dmg of=/dev/rdisk2 bs=1m

(Deducting points only for the lack of modern security patches and the difficulty of obtaining a valid DMG installer today).

: Software like TransMac or Uni-Beast allows users to restore a DMG file to a USB drive. This involves formatting the drive for Mac within the app and using the "Restore with Disk Image" function. 3. Executing the Installation

Paste the following command (assuming your USB is named MyVolume and the installer is in your Applications folder): sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume .