What is a Zombie Process and How to Kill it

Zombie Process in Linux

In this tutorial i will show you how to find a zombie process and how to kill it.

What is Zombie Process

Simply it's a process which did run by an application and did not have wait time or wasn't killed later by it's main app.

How to Find Zombie Processes

#1 By Running TOP Command

Which will show you the number of running processes and zombie processes.

#2 Run PS AUX

ps aux | grep 'Z'


ps aux | awk '{ print $8 " " $2 }' | grep -w Z


ps aux | grep -i 'defunct'

Like that you can find 'Z' in the stats which means it's a Zombie Process, after that find the parent or the tree by running following command.

pstree -p -s xxxxxx  "replace the xxxx with the  process id"


Kill Zombie Process

After finding the list of Zombie processes just simply run the kill command

kill -9 xxxx "replace the xxxx with the  process id"


Subscribe to
for video tutorials updates