Tutorial :How do I kill a process by its name in Linux?


I have a process with the name bla, and I want to kill it by its name.

When I run ps aux | grep "bla", I get 2 entries:

  • process bla and
  • blablablab

How do I filter it out?


killall bla  

to force it:

killall -9 bla  


Take a look at pkill, if available.


You can use the PID of the process to kill it.

Check out man pages for command kill.

The exact option would be kill -9 <pid>


While the killing question has been well answered, you asked how can you avoid getting the process "blabla" when you wanted "bla". What you want to do is add -w:

ps aux | grep -w "bla"  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »