dd

Copies input to output with a changeable I/O block size, while optionally performing conversions on the data.

Overwrite a disk with data

!!! WARNING: THIS WILL OVERWRITE ALL DATA ON THE TARGET !!!

Random data

sudo dd if=/dev/urandom of=/dev/{target block device name} bs=1M status=progress

Zeros

sudo dd if=/dev/zero of=/dev/{target block device name} bs=1M status=progress

Examples

sudo dd if=/dev/urandom of=/dev/sda bs=1M status=progress
sudo dd if=/dev/zero of=/dev/sda bs=1M status=progress

Last updated