44

I have a process I would like to kill:

computer@ubuntu:~$ ps aux | grep socat root 2092 0.0 0.0 5564 1528 pts/1 T 14:37 0:00 sudo socat TCP:xxx.17.29.152:54321 PTY,link=/dev/ttyGPS0,raw,echo=0,mode=666 computer@ubuntu:~$ kill 2092 -bash: kill: (2092) - Operation not permitted <--------------- How to kill ?? 
1
  • 4
    The command you list here is running as root. Have you tried running sudo kill 2092? Commented Sep 3, 2013 at 22:18

2 Answers 2

40

try kill command with with -9 signal if sudo kill 'pid' does not work: sudo kill -9 2092

6
  • 3
    I have a process that cannot be killed even with root (i'm running bash as root already). Any ideas what to try next? Commented Jan 15, 2018 at 15:57
  • 1
    What process are you trying to kill and the error you are receiving? Commented Jan 17, 2018 at 0:44
  • 2
    It is a stuck iftop and I get a "permission denied". Both iftop and kill are run by root itself. I started iftop from a bash and I can't kill that bash either. Commented Jan 17, 2018 at 9:45
  • 6
    I have a process in which I did sudo kill -9 2091 and it still gives this message. Why would that be (os/x high sierra) Commented Sep 29, 2018 at 19:05
  • 5
    It seems there are some processes that cannot be killed even like this. I cannot kill softwareupdated like this. Commented Jun 7, 2019 at 3:04
19

That command is running under sudo as root, your kill command must as well:

sudo kill 2092

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.