It uses three passes by default, writing pseudo-random data to the device during each run.įor example, if you want to erase a device that is present as /dev/sdb on your Linux system, the command would be as follows: sudo shred -v /dev/sdb That is why it is frequently used to erase data securely.īecause shred is part of the coreutils package in Linux, you most likely have the command available by default on your system.
The command helps in overwriting the data several times, such that it can only be recovered with extreme difficulty, if at all, using specialized hardware. We start with the shred command because it is one of the best ways to protect your private data on a Linux system. However, wiping the disk with one of the following commands, shred, dd, or wipe, assures that the information you erased is unrecoverable. As a result, with a high probability, a considerable portion of this data can be recovered using specific techniques. Using the rm command or a file manager to delete files just removes the pointer to the filesystem. The truth, however, is slightly different. Many users probably believe that deleting their data using the file manager or the rm command ensures security.
The most typical reason for completely and irreversibly deleting a device is when, for example, it is to be given away or sold. Sometimes we have to erase all the information from our disk in a way that ensures it is impossible to recover. This article shows you the three best ways to completely erase data from your disk using the dd, shred and wipe command.