Posts Tagged kill pkill linux

‘pkill’ – the lazy mans ‘kill’

sfullenwider on his blog talks about the kill command, often used to terminate rogue processes. It requires a PID however to be useful, and finding PIDs are too much of a pain for lazy people such as myself. I use a much easier and powerful alternative named pkill. pkill allows you to pass the equivalent kill command without knowing the processes PID. Most notably I used pkill to kill processes by their process name such as:

pkill -9 fire This of course matches any processes with ‘fire’ in them, specifically I am trying to kill firefox after it’s been possessed by a flash applet gone evil. pkill is a lot more powerful than this simple example, although I’ve never bothered to try anything more than simple regex name matching.

3 Comments