Skip to main content

Zero a hard drive in Linux

  1. Unmount the drive: (if you haven't already)
    sudo umount /dev/sdX*
    • Check with lsblk to confirm unmounting


  2. Write zeros with progress:
sudo dd if=/dev/zero of=/dev/sdX bs=4M status=progress
  • status=progress displays transfer progress (e.g., bytes written).

 

Verify drive identifier:

Ensure sdX matches your drive to avoid data loss.