Sunday, February 17, 2013

Write ISO Files to USB from Linux Command Line

Here's a command that I use too often not to post about it:

dd if=my_iso_file.iso of=/dev/sdx

This little gem is pretty straight-forward. It uses dd (properly termed "Disk Destroyer") to write your ISO file, block by block, to your USB drive. Of course you have to replace the "x" in "sdx" to whatever your drive letter is.

To discover your drive letter, as a root user (or using sudo), type:

fdisk -l

Which will list the available, block-type partitions on your system. You should be able to conclude (usually from the size of the device) exactly what your USB drive's mount point is named (this will usually just be "sdb"). Be sure not to overwrite your hard-drive!

Once you have written the ISO file, you should run the following to clean the systems writing buffers:

sync

No comments:

Post a Comment