To kill -9 based on the string you need to do something like this:
ps axf | grep <process name> | grep -v grep | awk '{print "kill -9 " $1}'
It will show you what you're going to kill and the pipe will show when the time comes to execute:
ps axf | grep <process name> | grep -v grep | awk '{print "kill -9 " $1}' | sh
Want to be a Linux expert? Come and join this Linux course
Do check out the video below