I've already looked at "How to have Linux wipe/randomize/sanitize RAM at shutdown?", but that's not what I'm looking for exactly.

I'd like to have it so when I shut down my machine, it executes the "sdmem" program, securely wiping my RAM. I've looked around at some other tutorials online related to this topic, yet none of them are really definitive of what needs to be done for this to execute successfully.

The program needs to be run as root, and I'm running Debian jessie if that really matters.

  • Instead of throwing insults at people, explain why that other question isn't what you want. (Granted, its current sole answer is probably not what you prefer, but that's a different matter.) – Gilles 'SO- stop being evil' Nov 17 '16 at 23:24

The following question discusses how to add a command to run at shutdown:

run a script at shutdown in Debain

However, I would recommend not using sdmem at all, and instead kexec'ing memtest86. This is a much more secure wipe of system memory, with a proof of concept for the idea given here:


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