Writing an image to a flash drive from the command line

Sometimes you need to make a bootable flash drive from an OS distro image or something else.

The linux command-line utility dd handles this.

Example of writing a CentOS disk image to a flash drive:

sudo dd if=CentOS-6.2-i386-bin-DVD1.iso of=/dev/sdb

/dev/sdb is your flash drive’s device id.

Before you start, unmount it:

sudo umount /dev/sdb