How to Securely Erase a Hard-Disk Drive

Hard-disk drives (HDDs) should be securely erased before being sold or recycled. This is a public note-to-self on how to achieve this in a simple and timely manner. Prerequisites The shred binary, which to my knowledge is included in all major Linux distributions. Moreover, you need a HDD which will be subject to secure erasure. You can NOT use shred to SECURELY erase solid-state drives (SSDs) or so-called non-volatile memory express (NVMe) devices. This is due to physical differences in the mechanism used to store information. ...

April 3, 2026 · 1 min · Kristoffer Opsahl

Using dd to Write an .iso to a USB Drive

dd is one of those commands for which I have to look up proper usage every usage because I use it regularly but not often. As such, this is a public note-to-self, which may or may not be useful to the reader. Prerequisites The dd binary is, to my knowledge, included on macOS and all major Linux distributions. Writing the File dd if= of= status=progress The if option tells dd to read from the provided path instead of stdin. The of option tells dd to write to the provided path instead of stdout. The status option tells dd to show periodic transfer statistics. The status option is primarily included because the program can otherwise seem unresponsive upon writing large .iso files, as the transfer to disk can take several minutes to complete. ...

September 14, 2025 · 1 min · Kristoffer Opsahl