Use The SysRq Key To Fix Any Linux Freeze-Up

Linux: No system is immune to hangs and freeze-ups, and that includes even the most austere Linux desktop. What sets Linux apart is a key that can call out to the core kernel to un-freeze your desktkop, kill memory-hogging services and cause a clean restart.

You'll need a full-size keyboard with a SysRq key, of course, or a laptop with the key available through a Function option. If you have that key, check that it's enabled as a "magic" system-level switch with this terminal command, which should return with a "1":

cat /proc/sys/kernel/sysrq

Assuming that's the case, you can then hold Alt+SysRq and tap certain keys to take semi-emergency actions — Alt+SysRq+R, for example, gives you back the keyboard if it's stopped responding, and you can then restart your system, restart a graphical X server, and so on. The How-To Geek site has a full list of commands and setup instructions for empowering that little-used key.

Use the Magic SysRq Key on Linux to Fix Frozen X Servers, Cleanly Reboot, and Run Other Low-Level Commands [How-To Geek]


    Cool... a Lifehacker series on Linux commands would be handy for newbies like me.
    I'd also like some explanation of command-line tools..
    ie what the hell does chown do?
    Whilst I can find out what to do by Googling, no-one ever explains what the commands I copy/paste actually do.
    I think chown must give ownership to some low level system command (possibly the kernel). or makes that system command aware of the changes made.

      @StevoTheDevo, chown "changes the ownership" of a file Linux comes with a powerful explaination of command-line-tools with the man "user manual" command at the command line type "man chown" you can even search the "user manual" with the -k option ie "man -k change owner"

    Gotta love dat Lenovo computer in the picture!

    Press and hold Alt+SysRq while you type "R E I S U B" (think "Raising Elephants Is So Utterly Boring") and you should be able to safely reboot an otherwise dead, locked up system

Join the discussion!

Trending Stories Right Now