Overwrite hard drive with random data
+2
−0
What is the basic sequence of command line steps to use a Linux Live USB drive to overwrite a built in hard drive with random data?
Please include instructions for how to figure out which is the correct device to overwrite, including how to make sense of any existing partitions on the drive.
1 answer
+0
−0
I've never done this but according to the ArchWiki you should run
shred -v /dev/sdX
to write random data to the drive. You can also run e.g.
shred -v /dev/sdX1
to wipe only a single partition. You can figure out the right device/partition ID by running lsblk or df. The shred command is part of GNU coreutils so it should available everywhere.

0 comment threads