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:
# killall bla
to force it:
# killall -9 bla
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"
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
# killall bla
to force it:
# killall -9 bla
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"