Linux查看进程和查看端口占用

查看进程

ps -ef|grep ****.jar

查看端口占用(如果出现命令找不到,安装一下工具即可)

netstat -lnp|grep 端口号

(命令找不到解决办法)
yum install net-tools

lsof -i:端口号

(命令找不到解决办法)
yum install lsof

快速查看进程PID

pgrep -l 进程名

杀进程

kill -9 进程PID

原文地址:https://www.cnblogs.com/juyss/p/13890532.html