Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm executing a command like:


But..why can't I kill it with "pkill"? I'm trying with:


but it doesn't kills the "COMMANDNAME -PARAMETERS" process. Why?

share|improve this question
up vote 14 down vote accepted

If you need to match the full command line (command + parameters) as you reported in your example you will have to use the -f option:


accordingly to the man page:

  -f     The pattern is normally only matched against the process name.
          When -f is set, the full command line is used.
share|improve this answer

From the man page:

pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout. All the criteria have to match. pkill terminates these IDs

So the "commandname -parameters" is not matching. What you should have is just:

pkill -9 commandname

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.