How to erase hard drives (shred, dd)
Last modified on July 24, 2026 • 1 min read • 101 wordsYou could write zeros to the whole hard drivedd if=/dev/zero of=/dev/hdaFor newer versions of dd, you can monitor the progress:dd if=/dev/zero of=/dev/hda status=progressHowever, it has been recommended to write a few passes of random noise (n = 3 is the default).
dd if=/dev/zero of=/dev/hdaFor newer versions of dd, you can monitor the progress:dd if=/dev/zero of=/dev/hda status=progressHowever, it has been recommended to write a few passes of random noise (n = 3 is the default). If the writing process entirely got rid of the magnetic history and your source of randomness was perfect, a single pass would ALWAYS be enough. In reality, you only need n>1 if you are dealing with the state secrets since recovering anything after an n=1 erase requires special equipment which you cannot buy in any store. shred -vfz -n3 /dev/hda