dd … of=/dev/sdadanger

Overwrite a raw disk, destroying every partition.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ dd if=/dev/zero of=/dev/sda bs=1M

  • ddcopy and convert data block by block
  • if=/dev/zeroset if for this command
  • of=/dev/sdaset of for this command
  • bs=1Mset bs for this command

What it does

Copies zeroes block-by-block directly onto the whole disk device /dev/sda, ignoring the filesystem entirely.

Why it's dangerous

It obliterates the partition table and all filesystems on the drive with no confirmation — dd is often nicknamed 'disk destroyer'. Point it at the wrong device and the data is gone.

Safer alternative

Triple-check the target with `lsblk` first, write to a partition or file rather than the whole disk when you can, and never run dd against a device unless you are certain which one it is.

More dangerous commands

Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.