How to Learn dd Command in Linux [10 Useful Examples]

dd is a powerful command-line utility in Linux that allows users to copy and convert data. It is commonly used to create bootable USB drives, copy disk images, and perform data backups. Here are 15 useful examples of how to use the dd command in Linux:

  1. Create a bootable USB drive: dd if=<ISO file> of=<USB device> bs=4M status=progress
  2. Copy a disk image to a USB drive: dd if=<disk image file> of=<USB device> bs=4M status=progress
  3. Create a disk image of a USB drive: dd if=<USB device> of=<disk image file> bs=4M status=progress
  4. Backup a partition to a disk image file: dd if=<partition> of=<disk image file> bs=4M status=progress
  5. Restore a partition from a disk image file: dd if=<disk image file> of=<partition> bs=4M status=progress
  6. Zero out a partition: dd if=/dev/zero of=<partition> bs=1M status=progress
  7. Create a bootable USB drive with a bootloader: dd if=<bootloader file> of=<USB device> bs=1M conv=notrunc status=progress
  8. Convert a disk image file from one format to another: dd if=<input file> of=<output file> bs=1M status=progress
  9. Copy data from one partition to another: dd if=<source partition> of=<destination partition> bs=1M status=progress
  10. Check the integrity of a disk image file: dd if=<disk image file> of=/dev/null bs=1M status=progress