Force reboot on Debian
Ever wanted to force a reboot on Debian without taking the risk of losing your SSH session and still having processes hanging on ?
Try this:
#!/bin/sh
# Flush IO buffers to avoid losing any data
echo s > /proc/sysrq-trigger
# Umount and remount all partition in Read Only
echo u > /proc/sysrq-trigger
# Force host reboot
echo b > /proc/sysrq-trigger
It's almost the same as holding down the power button, very efficient.
Written by Grégoire Morpain
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#