How can I kill a process by name instead of PID, on Linux? [duplicate]

Solution 1:

pkill firefox

More information: http://linux.about.com/library/cmd/blcmdl1_pkill.htm

Solution 2:

Also possible to use:

pkill -f "Process name"

For me, it worked up perfectly. It was what I have been looking for. pkill doesn't work with name without the flag.

When -f is set, the full command line is used for pattern matching.