Thursday, August 13, 2020

dd is a great tool to fully wipe out your disk data to forensic levels How to wipe a hard drive clean in Linux

dd is a great tool to fully wipe out your disk data to forensic levels

# dd if=/dev/zero of=/dev/DISK/TO/WIPE bs=4096

# dd if=/dev/zero of=/dev/sda bs=4096

# dd if=/dev/zero of=/dev/sdX bs=512 

If you messed up your master boot record (MBR) you can wipe it using this command:

dd if=/dev/zero of=/dev/hdX bs=446 count=1 #replace X with the target drive letter.

If you are wiping your hard drive for security, you should populate it with random data rather than zeros (This is going to take even longer than the first example.) :

# dd if=/dev/urandom of=/dev/DISK/TO/WIPE bs=4096

# dd if=/dev/urandom of=/dev/sda bs=4096

# dd if=/dev/urandom of=/dev/sdX bs=512 

# dd if=/dev/urandom of=/dev/sdX bs=4096 status=progress

---