User Tools

Site Tools


linux:kernel:sysrq_key

This is an old revision of the document!


Linux - Kernel - SysRq Key

SysRq Key – The Magic Key To Control Linux.

Linux does crash. Not often, but it happens.

When an application refuses to obey, but if everything fails, the last solution is using the supreme power on Linux: the magic SysRq key.

By using this key with a combination of “Alt” and another letter, you will be able to make your computer respond no matter what.


How To Activate The Magic Key

The magic key is super handy. But first, you have to activate this functionality if it is not already done.

To check:

cat /proc/sys/kernel/sysrq

If it returns a 1, the Magic Key is working.

If it is a 0, you will need to activate it.

In most cases, if you want to activate it temporarily, you can try:

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

If this does not work try:

sudo sysctl kernel.sysrq=1

Note that this will be only temporary.

If you want the Magic Key to work even after a reboot, the best way is to edit the file “/etc/sysctl.conf”, so that the line

/etc/sysctl.conf
kernel.sysrq = 0

becomes

/etc/sysctl.conf
kernel.sysrq = 1

linux/kernel/sysrq_key.1584697512.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki