Linux, despite “popular belief”, does crash (hangs or jams). Sometimes it is one or two applications per deadlock and everything can be resolved with a kill -9 to the application hanging from the terminal, this only if it is possible to change the terminal with ctrl + alt + 1, or ctrl + alt + 2, or or doing a Ctrl + Alt + Backspace (if you have it enabled) to restart the X; But if after they have already tried all of the above and still nothing could be achieved, many of us or those of us who do not know this, what we do is press our power button to turn it off and this causes our disk to start to fail Lasted.

What should we do when Hangs?

Magic SysRq key is a key combination in the Linux kernel that allows the user to execute various low-level commands regardless of the system state. This means that, even if your computer hangs on all sides and seems not to respond, this set of keys will give you a better solution than the “power off” one, allowing you, among other things, to synchronize the hard drives so that you do not lose everything. what you have been doing.

How does it work? Easy. The standard combination is as follows: ALT + Sysrq (print screen) + command, where Sysrq is the key that appears on current keyboards as Print screen and Sys Request (System Request). One of the most famous combinations is REISUB:
Alt + SysRq+:


R: Puts the keyboard in XLATE mode (ASCII mode, NOT UNICODE)

E: Terminates (term) all processes (except init).

I: Forces the “cascaded” processes to end, so that the files in use can be written to disk.

S: You empty the disk caches, finalizing all disk writes.

U: Reassemble all filesystems as read-only, so that nothing can be accidentally written just before the reset.

B: Reset the system.

If, for whatever reason, the Sysrq key doesn’t work for you, write the following: echo command> / proc / sysrq-trigger

Where command is any letter you want Sysrq to make.


Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *