分享

Linux当机了?就这么办!

 mtjs 2014-03-16

Linux gets frozen, what do you do?

Somehow, you crashed your Linux. It’s completely frozen. You try pressing Ctrl + Alt + Backspace, but doesn’t help.

What to do? Someone would press the power button and restart or shut down the system.You shouldn’t do this. This can make you a lot of problems.

 

What you can do, is to perform a gentle Linux restart.  This is much safer way to restart your frozen Linux.  To do this, you need to press:

Ctrl + Alt + PrtSc (SysRq) + reisub

Just to make it clear. You need to press and hold Ctrl, Alt and PrtSc(SysRq) buttons, and while holding them, you need to press r, e, i, s, u, b

This will restart your Linux safely.

It’s possible that you’ll have problem to reach all the buttons you need to press. I’ve seen people type reisub with their nose :)

So, here’s my suggestion: With your smallest finger on the left hand, press Ctrl. With your thumb on left hand, press Alt. With the smallest finger on your right hand press PrtSc(SysRq) button. This way, you’ll be able to access to reisub buttons with your other fingers.

Okay, but what this REISUB means? 

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

You can find the complete list here. There you can see that shuts down the system. So, if you want to turn off your PC when your Linux crash, you can use this combination:

Ctrl + Alt + PrtSc (SysRq) + reisuo



 Note that you should wait a couple seconds after each step (at least after syncing). Also, if you need help remembering the reisub sequence, it’s “busier” backwards :)

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多