Linux 命令

默认分类 · 01-28

端口占用

一,指定端口

lsof  -i:端口
netstat -tunlp |grep  端口

二、查看服务器所有端口

netstat -ntlp

三、查看某进程端口占用,例Tomcat

ps -ef |grep tomcat

杀掉进程

sudo kill -9 端口
Theme Jasmine by Kent Liao