If you somehow find your Linux system crashes, do not kill (pressing power button) the computer directly. Such hard kill may broke your hard disk drive or corrupt your data. When you are facing system hang or crash or freeze, you can use Linux special shortcut keys to restart or shutdown safely. It is actually something called Linux Magic SysRq Keys[1]. Do not use these shortcut keys unless you need it urgently. And you can use these shortcut keys on another Linux distro.
Restart
Alt + Printscreen + REISUB
It means hold the Alt and printscreen by right hand, then press R + E + I + S + U + B by left hand. Respectively, I show below explanation for each key.
- R: take control the keyboard from X Server
- E: send SIGTERM signal to all processess (prepare them to death[2]) except init
- I: send SIGKILL signal to all processess (kill them[3]) except init
- S: sync all mounted filesystem
- U: unmount all filesystem and automatically sync them
- B: reboot without unmounting and syncing filesystem
- O: shutdown