2014年2月27日 星期四

linux - 如何找到佔據port的process並將它關閉?

參考:how to kill process running on particular port in linux?

直接貼解決方式:

Use the command
 netstat -plten |grep java
used grep java as tomcat uses java as their processes.
It will show the list of processes with port number and process id
tcp6       0      0 :::8080                 :::*                    LISTEN      
1000       30070621    16085/java
the number before /java is a process id. Now use kill command to kill the process
kill -9 16085
-9 implies the process will be killed forcefully.


沒有留言:

張貼留言