If your Linux PC hangs.
We have used Linux PCs exclusively since the business started. On the rare occasion that the system hangs and becomes unresponsive here are the options.
Before trying a hard reboot, always attempt a more graceful method to avoid data corruption. Performing a gentle reboot involves several steps, starting from the least disruptive to more forceful options. Here's how:
1. Try to Access the Terminal (TTY)
If the graphical interface is unresponsive but the system isn't entirely frozen, try accessing a different terminal.
- Switch to TTY by pressing `Ctrl` + `Alt` + `F1` (or `F2`, `F3`, etc., up to `F6`).
- Log in using your credentials, then try to restart the system gracefully with:
>>bash
sudo reboot
>>
2. Use REISUB (Magic SysRq Key)
If the system is completely frozen but still responsive to keyboard input, you can use the Magic SysRq key to safely restart the machine. This is done by pressing a specific key combination.
- Hold `Alt` + `SysRq` (also known as Print Screen) and, while holding these, press the following keys slowly in sequence:
`R` (Take control of the keyboard)
`E` (Terminate all processes)
`I` (Kill remaining processes)
`S` (Sync filesystem)
`U` (Unmount disks)
`B` (Reboot the system immediately)
This is known as REISUB, and it's a safer way to reboot a system when it's unresponsive.
3. Force a Reboot with REISUO
If you want to power off the system instead of restarting it, use REISUO (same steps as above, but replace `B` with `O` to power off).
4. If All Else Fails: Hard Reboot
If none of the above works, a last-resort method is to force a power-off by holding down the power button until the machine shuts down (usually takes 5–10 seconds). However, this can cause data loss, so it should be used only if no other options work.
These steps should help you perform a gentle restart on a crashed Linux system while minimizing risks of data loss.