Linux —— 查询端口对应进程,并杀死

查询端口对应PID

方式1:lsof命令

lsof -i:{端口号}

方式2:netstat命令

netstat -tunlp|grep {端口号}

杀死进程

kill -9 {pid}

posted @ 2022-04-13 16:07  TBHacker  阅读(369)  评论(0编辑  收藏  举报