TIL - Magic SysRq with SystemD

Posted by Marcus Folkesson on Sunday, May 19, 2024

TIL - Magic SysRq with SystemD

TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post

The Magic SysRq [1] is a ueful tool for debugging and recovering from a frozen system and is something I use frequently.


SystemD sets the permissions bitmask to 0x10 by default [2] , it means that only a subset of the available features is allowed.

To permamently enable all features, add kernel.sysrq = 1 to your sysctl configuration.

If you are only interrested in the current session, you can run either

1sysctl kernel.sysrq=1


1echo 1 > /proc/sys/kernel/sysrq