ponedeljek, 24. marec 2014

How to remotly restart/shutdown Linux box

Usual commands are:
sudo reboot
sudo shutdown -h now
But if those two don't work, you can use this as root:
- force reboot:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
- force shutdown:
echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger
WARNING: This does not sync any disks, ....
You could also try
echo s > /proc/sysrq-trigger 
to sync disks before reboot/shutdown.
For all values of /proc/sysrq-trigger go to kernel documentation
Objavite komentar