# show SD card - something like /dev/XXXX e.g /dev/sdb1
df –h
# unmount the card to prevent card access while writing the image
umount /dev/XXXX
# write image
dd if=/path/to/image.img of=/dev/XXXX
# …compressed image (gzip) and larger block size (faster)
gzip -dc /path/to/image.img.gz | dd bs=4M of=/dev/XXXX
# create new image
dd if=/dev/XXXX of=/path/to/image.img
# …compress on the fly and enlarge block size
dd bs=4M if=/dev/XXXX | gzip > /path/to/image.img.gz