$linuxjunkies
>

magic SysRq

also: SysRq, Magic SysRequest

A kernel feature that allows direct communication with the Linux kernel via keyboard shortcuts, even when the system is unresponsive, enabling emergency debugging and system recovery.

Magic SysRq is a special kernel interface triggered by pressing Alt+SysRq (Print Screen on most keyboards) followed by specific single-letter keys. It bypasses normal input processing, allowing privileged operations to execute directly at the kernel level regardless of system state.

Common uses include emergency reboot (Alt+SysRq+B), safe unmount of filesystems (Alt+SysRq+U), process termination (Alt+SysRq+I), and memory sync (Alt+SysRq+S). The mnemonic "REISUB" helps remember a safe shutdown sequence: Alt+SysRq then press R, E, I, S, U, B in order.

Magic SysRq can be disabled for security reasons via /proc/sys/kernel/sysrq. When disabled (value 0), the feature is unavailable; when enabled (value 1 or higher), different values control which operations are permitted. This is invaluable for servers where SSH is unresponsive or systems with frozen graphics.

Related terms