Clean reboot of hung Linux server : Quick HOWTO

In day to day system administration job, you may come across the situation that your Linux server is hung or freeze and your system is not responding even  for Ctrl+Alt+Del in console itself and you must need to do a hard reboot by pressing reset button. As everyone know, the hard reboots is not good and can crash the File systems. so what to do now?

There is a way in Linux,

Hold down the Right Alt and SysRq keys and press this sequence:

  R E I S U B

This will cleanly unmount the drives, terminate the processes and nicely reboot your machine.

of course, To get this worked, you need to “enable” this feature on the running kernel first !

On 2.6 kernel

echo 1 > /proc/sys/kernel/sysrq

This will do the trick.

In Some distributions, you may have a way to enable this feature at boot time. 

On Fedora and RHEL, edit the file /etc/sysctl.conf, and change the line kernel.sysrq = 0 to kernel.sysrq = 1

Hope this helps to some one..!

Share this

Related Posts

Next Post »


Write comments
February 6, 2012 at 5:51 PM delete

Thanks for the quick and easy to read tutorial. Appreciate your good work.


March 18, 2012 at 9:09 PM delete

Good work!!

Kizito Okema

July 24, 2012 at 7:24 PM delete

Can you tell me if this will create a crashdump file?


What do you think about this Article? Add your Opinion..! EmoticonEmoticon