How can I kill a process running on a specific IP and port?

Stephen

I was wondering, is there any way to kill a process that is running on a specific IP and port on Ubuntu 14.04 on a local IP and port? Preferably, this would be in one command, but if not, a bash script would be perfectly fine as well.

Stephen Rauch

There are likely cleaner ways, but something along the lines of:

netstat -lnp | grep 'tcp .*127.0.0.1:9984' | sed -e 's/.*LISTEN *//' -e 's#/.*##' | xargs kill

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to kill a process running on particular port in Linux?

How can I kill TCP port 16969 in Bash?

How can I kill a process by name instead of PID?

How do I kill the process currently using a port on localhost in Windows?

How can I kill whatever process is using port 8080 so that I can vagrant up?

How to kill a process on a port on ubuntu

How do I kill a specific process running in the background from the command prompt?

How to Kill Running Process from a specific folder via Batch File

One command to kill a process using a specific port

How can i kill process that i have started with python

How can I automatically kill the process with the highest CPU load?

How to create alias to kill processes running on a TCP/IP port?

How can I kill a particular thread of a process?

How can I kill an unkillable process?

I can't kill a port process

Kill process running on port 80

How can I create a hard to kill process

How to kill a running iPython process

How to make sure that the process is still running so that I can kill it?

Kill process on specific port

How can I kill process by specific name and exclude root processes

How can I kill a process as user www-data

How can I kill a specific X window

How can I execute logout() when I kill process?

Stop a process from listening to specific port but not kill it?

Kill process that is taking specific port

linux command to kill a process in a running port

How can I clear the process running on my target port?

How can I kill a process by name in Rust