Kill processes on Win


On Linux/Unix it’s very easy to find process ID of certain process:

ps -ef | grep processName 


ps aux | grep processName

then the Process ID is the second column of the output (usually written as variable $PID or ${PID})

 kill -9 ${PID}

However, in Windows the command line are much limited, we can use tasklist and taskkill to find the name/PID of the process then kill it.

For example to kill all the instance of Skype.exe and its “children” process on Win:

 taskkill /f /t /im Skype.exe

Or find the PID by the output of  tasklist 

 tasklist | FIND "Skype.exe"


taskkill /pid ${PID}


We can also use some programming language to invoke a process/thread to killByName and killByPID respectively.


On recent versions of Windows, there are also WMIC and PowerShell to help find the PID easier, however I will not introduce them here. You may try it yourself ;-) .


Bonus: command to restart Windows fast

  shutdown.exe -r -t 0





A brother, husband and father...
This entry was posted in Linux, Skill. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s