Kill and defunct (zombie) processes (kill, pstree, xkill)

Sometimes you cannot kill some processes via the regular command kill -9 PID When you list them with ps -aux you will see the entry defunct Those defunct processes are apparently still hanging around mostly because their parent application is waiting for them to receive something. These processes are already dead, that's why they are called "zombies". In order to kill them, you have to kill the parent application first. You can figure out what the parent's PID is by issuing pstree PID

The kill command can do more than kill, e.g. terminate, quit, hang up, etc. To list its possibilities, type kill -l You can either use the number or the string to define what kill should do. Therefore the following two commands are identical: kill -KILL PIDkill -9 PIDTo terminate all processes that you are allowed to terminate, use -1 as the PID. Obviously, you need to specify the action by using its string (otherwise -1 would be interpreted to be the action that kill is going to perform, i.e. HUP): kill -KILL -1

To easily kill applications with a GUI, you can use xkill. You just need to select the window of the process you wish to kill with the mouse.