What dd does
dd copies and converts data. It is used to make disk images, clone partitions and create bootable drives. By default it prints nothing until it finishes, which is hard to bear with large copies. The option status=progress shows the amount copied, the speed and the time elapsed.
Syntax
dd if=<input_file> of=<output_file> [options]
if=is the input file or device.of=is the output file or device.[options]are extras, such as the block size.
of= can overwrite a disk and destroy your data. Check the names with lsblk before you run dd.Show progress
dd if=input_file of=output_file status=progress

Useful options
**Block size (bs).** A larger block makes the copy faster:
dd if=input_file of=output_file bs=1M status=progress

**Count (count).** Copy only a number of blocks:
dd if=input_file of=output_file bs=512 count=1000 status=progress

This copies 512,000 bytes.
**Skip (skip).** Skip blocks at the start of the input:
dd if=input_file of=output_file bs=1M skip=100 status=progress

It skips the first 100 MB of the input.
**Seek (seek).** Start writing after a number of blocks in the output:
dd if=input_file of=output_file bs=1M seek=50 status=progress

**Conversion (conv).** Common values:
notruncdoes not cut the output file.noerrorcontinues after read errors.syncpads incomplete blocks with zeros.
dd if=input_file of=output_file conv=sync,noerror status=progress

This helps when you copy from a faulty disk.
Make a disk image
sudo dd if=/dev/sda of=/path/to/disk_image.img bs=1M status=progress

To restore the image, swap if and of.
Clone a partition
sudo dd if=/dev/sda1 of=/dev/sdb1 bs=1M status=progress

The target partition must be at least as big as the source, and it must not be in use.
Quick recap
status=progressshows live progress.- Use
bs=1Mfor speed. - Always check
if=andof=before you press Enter.