How to crash a linux server

Reading Time: < 1 minute

Easy!

You need to execute this as root.

First enable SysRq feature in the kernel
echo “1” > /proc/sys/kernel/sysrq

Then crash the kernel (makes a kernel dump)
echo c > /proc/sysrq-trigger

Reboot with no conditions (no disk unmount, just like pressing reset button)
echo b > /proc/sysrq-trigger

Shutdown all the processes gracefully except init
echo e > /proc/sysrq-trigger

Kill all the process brutally except init
echo i > /proc/sysrq-trigger

Reading Time: < 1 minute

Easy!

You need to execute this as root.

First enable SysRq feature in the kernel
echo “1” > /proc/sys/kernel/sysrq

Then crash the kernel (makes a kernel dump)
echo c > /proc/sysrq-trigger

Reboot with no conditions (no disk unmount, just like pressing reset button)
echo b > /proc/sysrq-trigger

Shutdown all the processes gracefully except init
echo e > /proc/sysrq-trigger

Kill all the process brutally except init
echo i > /proc/sysrq-trigger

By Marc Olivier Meunier

Marc has spent the past few years putting oil on the fire of a hyper growth ad tech company. At Smartly.io he was in charge of scaling the support and its culture. At Eficode he is now leading an engineering team and running operations. He leads by example and puts a lot of emphasis on diversity and inclusion, constantly working to create a safe environment. A warm leader with a passion for memorable experiences and innovation.
Find Marc on Linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *