lsof命令 $ lsof -nP -iTCP:端口号 -sTCP:LISTEN netstat命令 # 根据服务名称查看 $ netstat -nltp | grep 服务名 # 根据端口号查看 $ netstat -nltp | grep 端口号