I found this somewhere online and I saved a script for me to run this. I forget where I found it, but it is very useful to me. So let’s say you have a process, namely a kernel process such as a device driver and you want to reboot your system and don’t have physical access to your machine, you can force a system reboot with the following script.
Please note that any files will not be flushed to the hard disk, even if you click “save” or write the file out to disk, there is a good chance that these changes will not make it, however, this is better than nothing, so make the best of it!
#!/bin/bash echo "Emergency reboot commencing" echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger
Or download it directly:
I found this somewhere online and I saved a script for me to run this. I forget where I found it, but it is very useful...