dd if=/dev/sda of=/dev/sdb bs=4M conv=fsync status=progress

Category: Backup & Restore

dd if=/dev/sda of=/dev/sdb bs=4M conv=fsync status=progress

Clone a disk directly to another disk

Copies /dev/sda block-for-block onto /dev/sdb, replacing everything on the target, so check both device names twice. conv=fsync flushes data to the physical disk before finishing, so the clone is truly written. status=progress shows the rate.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.