Nasser Heidari

2009/02/16

Linux Force Reboot and shutdown

Filed under: Linux — Nasser Heidari @ 09:42
Force Reboot :
#echo 1 > /proc/sys/kernel/sysrq
#echo b > /proc/sysrq-trigger
If you want to force shutdown machine try this.
#echo 1 > /proc/sys/kernel/sysrq
#echo o > /proc/sysrq-trigger
About these ads

11 Comments »

  1. Great! Thanks!

    Darko

    Comment by Darko — 2009/04/23 @ 08:06 | Reply

  2. Thanks a lot

    This really helped me out. I was remotely connected to a server with some blocked processes, and this was the only way to reboot the server.

    Per

    Comment by Per — 2009/05/17 @ 08:00 | Reply

  3. Hi,

    great work. Sometimes the only way if reboot or shutdown fails.

    Comment by Some Dude — 2009/09/21 @ 15:42 | Reply

  4. Great!
    You very help me!

    Comment by girlax — 2010/06/25 @ 00:20 | Reply

  5. نجاتم داد این دستور ! مرسی !

    Comment by saeed — 2010/08/16 @ 01:27 | Reply

  6. Thanks for that

    Comment by tim — 2010/11/09 @ 12:47 | Reply

  7. Helped me out a lot of times with some kvm hangs.

    Comment by André — 2011/02/25 @ 19:55 | Reply

  8. I dont think the above will work if the file system is read-only (eg corrupt HDD). In this case the command would be:

    reboot -n -f

    Comment by Brian — 2011/07/06 @ 05:04 | Reply

  9. Wow, thank you! This worked on Debian 5 64bit! It rebooted my server even when it was hosed.

    Comment by Zach — 2011/07/17 @ 03:08 | Reply

  10. Thanks a lot! This is exactly what i need right now.

    Comment by Iyan — 2011/08/05 @ 20:00 | Reply

  11. @Brian There is no way it will fail because of a file system hangup. The kernel tells the processor to reboot directly. It reboots so hard that it doesn’t even send back the newline once you press .

    Comment by 1111 — 2011/12/10 @ 12:44 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: