1

What's the easiest way to write over a hard disk (such that you could give it to a friend, etc.) on elementary OS?

0
  1. Run sudo fdisk -l to determine which /dev/sdX drive you will rewrite. (The drives are listed in an order: sda for your main drive, sdb, sdc, etc. for your remaining drives.) Use that path in place of sdX in the next command:
  2. Run sudo dd if=/dev/zero of=/dev/sdX status=progress to write zeros to your disk. (status=progress is a recent addition to see the process's status—it might not work on your system.)

If you'd prefer to use a GUI, gdiskdump is relatively straightforward, but I think the above is easier than installing software for a single operation. To install, run sudo apt install gdiskdump.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.