×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Massimo Zappino
Added: Sep 21, 2012 7:05 AM
Modified: Sep 21, 2012 7:16 AM
Views: 56
If you want to kill the process running on a specific port, for example 12345, you can use netstat and then kill the process.
  1. # find process with netstat
  2. netstat -tulpn | grep :12345
  3.  
  4. # find process with fuser
  5. fuser 12345/tcp
  6.  
  7. # show the process name listing /proc directory (replace PID with the pid you found)
  8. ls -l /proc/PID/exe
  9.  
  10. # kill the process (replace PID with the pid you found)
  11. kill -9 PID