Remote Hard Reset or Shutdown

Hard reset on linux command line

I use this command to remotely hard reboot linux servers (only when absolutely necessary). Hard reboot mean that shutdown scripts will not run and machine will reboot immediately without syncing hard disk drives, shutting down applications etc, – it’s like hitting the reset button.

# echo 1 > /proc/sys/kernel/sysrq
# echo b > /proc/sysrq-trigger

This command enables sysrq and afterward calls fast reboot.  When I want to force a complete shutdown I use this instead:

# echo 1 > /proc/sys/kernel/sysrq
# echo o > /proc/sysrq-trigger

This comes in handy when an ESX host gets wonky and I’m forced to deal with it remotely.  Sometimes I can still access the machine via SSH but can no longer do anything

This entry was posted in CLI HOWTOs. Bookmark the permalink.