dd copies raw bytes from one place to another — and its nickname, "disk destroyer", is earned honestly. It writes exactly what you ask, exactly where you ask, with no questions asked. Learn it slowly, use it deliberately, and it becomes the honest tool for disk images, bootable USBs, and exact copies.

The shape of every dd command #

The canonical form: input, output, block size
$ dd if=source of=destination bs=4M status=progress

if is input file, of is output file. Everything else is tuning. There are no safety rails: of= a real device and dd will happily overwrite whatever was there.

The legitimate jobs #

Write an ISO to a USB stick — the daily classic:

Make a bootable USB (of= is the whole device, not a partition)
$ dd if=aospix-1.0.iso of=/dev/sdc bs=4M status=progress oflag=direct

Back up an entire disk or partition as a single file:

Exact copy of a partition
$ dd if=/dev/sda2 of=sda2.img bs=4M status=progress

Rescue the copy elsewhere, or extract a range with skip and count:

Copy 1 GB from offset 2 GB
$ dd if=disk.img of=part.img bs=1M skip=2048 count=1024
OptionMeaning
bs=4MRead and write 4 MB blocks — the speed knob
status=progressShow live progress instead of silence
skip=N / count=NStart N blocks in; copy only N blocks
oflag=directBypass caches for USB writes
conv=sync,noerrorKeep going on read errors (rescue mode)

The safety rituals #

Confirm the target before pressing enter — twice:

The step that prevents the horror story
$ lsblk -d -o NAME,SIZE,MODEL
$ # /dev/sdc really is the 16G USB stick, not your 1T disk

Then sync before unplugging; dd returns before the kernel flushes:

Flush writes to the device
$ sync

For file-level copies that skip identical data, rsync is the everyday tool; dd is for when you need the bytes themselves. Related: mount and fstab, and the whole terminal notes series.