Error when trying to kill processes -- "kill: pid: arguments must be process or job IDs"

33,777

It's

kill 1483
kill 1484

When you entered

kill pid 1483

What you said in effect was

Please kill the processes with number 'pid' and 1483.

The reference to pid in the message

-bash: kill: pid: arguments must be process or job IDs

is telling you the string 'pid' was not a valid process ID

Share:
33,777
Nate
Author by

Nate

I'm a senior in college, majoring in EE and minoring in CS, with a passion for electronics and programming. I'm an entrepreneur and started a small hobby electronics company called FoxyTronics a few years ago, and am now working on launching a shopping website called PriceWombat.

Updated on August 15, 2020

Comments

  • Nate
    Nate over 3 years

    I'm trying to kill Sphinx on my server so that I can restart it. I tried using this command to find the PID:

    ps ax | grep "searchd"
    

    Which printed out this:

     1483 ?        S     00:00 /usr/local/bin/searchd --config /path/to/sphinx.conf
     1484 ?        Sl    20:51 /usr/local/bin/searchd --config /path/to/sphinx.conf
     1523 ?        S      0:00 /usr/local/bin/searchd --config /path/to/another/sphinx.conf
     1524 ?        Sl    20:35 /usr/local/bin/searchd --config /path/to/another/sphinx.conf
    14174 pts/0    S+     0:00 grep searchd
    

    I'm confused why there are duplicate entries and can't figure out what the S or Sl columns mean, but I tried this:

    kill pid 1483
    kill pid 1484
    

    But that outputted this error:

    -bash: kill: pid: arguments must be process or job IDs
    

    When I list the processes again, it looks like it did kill the processes (I ran the kill command for the first two), but the error makes me wonder what I did wrong?