Skip to content

Instantly share code, notes, and snippets.

@Likeyn
Last active December 16, 2015 16:59
Show Gist options
  • Save Likeyn/5467248 to your computer and use it in GitHub Desktop.
Save Likeyn/5467248 to your computer and use it in GitHub Desktop.
Russian Process Roulette: kill a random process
#!/usr/bin/env bash
# Kills one process randomly (including init)
p=$(ps -Aopid|sort -R|head -1)&&ps -p$p&&kill -9 $p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment