先把服务启动起来,通过ps -ef|grep 关键词找到对应的pid,比如 ps -ef|grep Tomcat 通过pid查询对应的端口信息 netstat -antup |grep LISTEN | grep 17565 | a
先把服务启动起来,通过ps -ef|grep 关键词找到对应的pid,比如
ps -ef|grep Tomcat
通过pid查询对应的端口信息
netstat -antup |grep LISTEN | grep 17565 | awk -F ':' '{if($4<20000) {print $4}}'
来源地址:https://blog.csdn.net/wutrg1502/article/details/126414174
--结束END--
本文标题: 好用的Linux命令-通过pid查看端口号
本文链接: https://www.lsjlt.com/news/391318.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0