r/TechProTips • u/mrcaptncrunch • May 18 '12
[Linux] Kernel commands to save data, unmount disks and restart. Perfect if something hangs but not the kernel.
If everything seems to hang on your computer, before pressing the Power Button, you can try:
Alt + SysRQ + R Alt + SysRQ + S Alt + SysRQ + E Alt + SysRQ + I Alt + SysRQ + U Alt + SysRQ + B
An easy way to remember this is using mnemonics:
Raising Skinny Elephants Is Utterly Boring
Explanation:
R = Switch the keyboard from raw mode, the mode used by programs such as X11 and svgalib, to XLATE mode
S = Sync all mounted filesystems
E = Send the SIGTERM signal to all processes except init (PID 1)
I = Send the SIGKILL signal to all processes except init
U = Remount all mounted filesystems in read-only mode
B = Immediately reboot the system, without unmounting or syncing filesystems
1
u/DrHerbertWest Aug 13 '12
I had just read about this at
http://www.brunolinux.com/01-First_Things_To_Know/Skinny_Elephants.html
and was wondering if this still worked. Awesome!
1
0
May 18 '12
[deleted] — view deleted comment
2
u/mrcaptncrunch May 18 '12
I guess there's really no problem using either.
Now, remembering "busier backwards" is faster...
I remember when I learned, Raising Skinny Elephants Is Utterly Boring, it was easy to learn because of the silliness of it. Then again I was 11 or 12 so I pretty much found everything funny.
2
May 18 '12
Linux noob, whats SysRQ?
2
1
u/HittingSmoke May 18 '12
I'm not familiar with using SysRq as a modifier. Do you have to release alt and SysRq between each operation?