Hubbry Logo
search
logo

Magic SysRq key

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Magic SysRq key

The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low-level commands regardless of the system's state. It is often used to recover from freezes, or to reboot a computer without corrupting the file system.

This key combination provides access to features for disaster recovery. In this sense, it can be considered a form of escape sequence. Principal among the offered commands are means to forcibly unmount file systems, kill processes, recover keyboard state, and write unwritten data to disk.

The magic SysRq key cannot work under certain conditions, such as a kernel panic or a hardware failure preventing the kernel from running properly.

The Linux kernel contains sysrq.c, which implements magic SysRq functionality. Magic SysRq functionality is called by serial devices at a low level in the driver code.

The key combination consists of Alt+SysRq and another key, which controls the command issued. SysRq may be released before pressing the command key, as long as Alt remains held down.

The combinations always assume the QWERTY keyboard layout. For example, on the Dvorak keyboard layout, the combination to shut down the system uses the R key instead of O. Furthermore, some keyboards may not provide a separate SysRq key. In this case, a separate PrtScn key should be present.

On some devices, notably laptops, the Fn key may need to be pressed to use the magic SysRq key, e.g. on Thinkpad Carbon X1 the SysRq is activated by pressing Alt+Fn+S simultaneously, then releasing Fn and S while still holding Alt.

A complete list of commands is available in the official Linux Kernel Documentation on Linux Magic System Request Key Hacks.

See all
User Avatar
No comments yet.