How to Find and Kill a Process that is Using a Particular Port in Ubuntu

26Feb09

I had a problem with tomcat, it says that port 8080 is already in use so I can not use it …

What I did ?

1- Find what application/process is using the pro, type:

sudo netstat -lpn |grep :8080

and press Enter.

You will get an output similar to this one

tcp6       0      0 :::8080                 :::*                    LISTEN      6782/java

2- I have got the process Id, which is 6782, now this is the process that is using port 8080.

3- Kill the process, type:kill 6782

kill 6782

and now port 8080 is free.

:)

About these ads


15 Responses to “How to Find and Kill a Process that is Using a Particular Port in Ubuntu”

  1. 1 hunters1094

    thanks, it’s very useful:)

  2. 2 cherivi seenu

    I tried with this command to kill the tomcat server.But it says Operation not permitted.Where could i find solution to this problem.I mean where to go for change this.

    • 3 Abdul

      Hi Cherivi,

      You are getting error because you are not logged on from root,So type
      “sudo kill processid” and enter..
      Eg:-
      sudo kill 1292

      Hope it helps..

  3. Awesome thanx a million

  4. 5 hyunjungsoh

    lol.. didn’t work for me..
    I had to use killall -9 java
    because I knew then the java was using the port.

  5. thanks a million :D

  6. Yes Kill -9 confirm that the process is dead! :)

  7. 8 meter down

    Thanks for you feedback. Appreciated

  8. Thank You!

  9. 10 assdsad

    Amigo muy util, gracias

  10. if it do not work… try “sudo kill -9 1292″

  11. sudo netstat -lpn | grep :80
    sudo kill -9

  12. 13 Ash

    THANKS A LOT !!!!!!!!!!!!! SAVED ME


  1. 1 Kill a process using a particular port in ubuntu « Ruby on Rails UI Designer | Ruby on Rails Frontend Developer
  2. 2 ubuntu下查看正在使用某个端口的命令 | Linunio | iOS & other

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: