You’re looking for the identifier for the USB drive you just formatted. Head back to Terminal and type the following to get a list of drives: diskutil list
With your IMG file ready to go, it’s time to write to USB. Following on from the example above, you could type ~/Downloads/ubuntu. For ease, we’d recommend using the same location for both. Similarly, you’ll need to provide a destination in which the DMG will be placed (no need to add the “.dmg” extension). Replace /path/to/downloaded.iso with the location of your downloaded Linux ISO, for example if ubuntu.iso is in your Downloads folder, you can type ~/Downloads/ubuntu.iso.