How to Perform a Disk Wipe in Linux

How to Perform a Disk Wipe in Linux thumbnail
How to Perform a Disk Wipe in Linux

When you delete files on a computer hard drive, only the pointer to the file is deleted. The actual data in the file is still on the hard drive until something else writes over it. This data can be retrieved using forensic tools. If you are selling your computer or throwing a hard drive away, you should write over all the data on the files. The Linux operating system uses the "shred" and "wipe" utilities to write zeros or random data over the entire hard drive.

Things You'll Need

  • Knoppix Linux Live CD
Show More

Instructions

  1. Boot into a Live CD

    • 1

      Download and burn a Linux Live CD, such as Knoppix (see Resources).

    • 2

      Insert the Knoppix Live CD into your computer's CD drive.

    • 3

      Reboot the computer and choose to boot into the Knoppix CD.

    • 4

      Take note of the device name for your hard drive on the desktop. It will look like "hda" or "sda" and is found under the hard drive icon.

    Shred

    • 5

      Click the "Konsole" button on the bottom toolbar to access a terminal window.

    • 6

      Type the command "sudo shred -vfz -n 100 /dev/sda" to write zeros (-z) to the entire time one hundred times (-n 100). The -v (verbose) option says to print the progress on the screen. The -f (force) option says to change the permissions on all files to permit overwriting them.

    • 7

      Type "exit" to close the Konsole window when the shred utility is finished.

    Wipe

    • 8

      Click the "Konsole" button on the bottom toolbar to access a terminal window.

    • 9

      Type the command "ls /dev/sd*" to see all the partitions that are on the hard disk. Replace the "sd" with the first two letters of the device name for your hard disk. Make note of the device names for each partition, for example "/dev/sda1".

    • 10

      Type the command "sudo wipe /dev/sda1" to wipe the first partition on the hard drive. Replace "/dev/sda1" with the device name for your partition.

    • 11

      Repeat Step 3 for each partition on the hard drive.

Tips & Warnings

  • These two commands will completely erase all data on the hard drive and are not reversible.

Related Searches:

References

Resources

  • Photo Credit Polka Dot RF/Polka Dot/Getty Images

Comments

You May Also Like

Related Ads

Featured