What to do when linux freezes?

What to do when linux freezes?

don't press the shutdown button

Well, we all know that nothing is perfect, not even linux, it sometimes freezes. It has happened to me several times, my solution? well, press and hold the power button and hope for the best.

Well, I was thinking there must be a better way to do it and, like most of the times, there is. It's called SysRq keys and it's a key combination only understood by the Linux kernel that lets you perform some low level operations no matter the state of the system, think of it like a safe reset button.

The key combination is Ctrl + Alt + PrtSc + REISUB, this means, you need to press and hold Ctrl + Alt + PrtSc and while pressing that combination, you need to write REISUB, each letter has one function

That way your system won't suffer any damage and it will gracefully Reboot Even If System Utterly Broken.

If you need to turn off your computer instead of reboot, you can switch B for O. You're welcome.

Recommended readings