Image a disk device to a raw file.
Section: Images and Clones
Create a raw disk image
bash
bash
sudo dd if=/dev/sdb of=disk.img bs=64K status=progress conv=sync,noerrorExplanation
Image a disk device to a raw file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Images and Clones
Write a raw image back to disk
Restore a disk image onto a target device.
Recover an unhealthy disk with ddrescue
Preferred over dd for failing disks because it tracks progress and retries.
Inspect a virtual disk image
Show image format, virtual size, and backing file info.
Convert a virtual disk image
Convert between raw, qcow2, and other image formats.
Compress a raw disk image
Compress large raw images for storage or transfer.
Compress an image with xz
Use stronger compression for cold storage backups.