ps -ef | grep tomcat
2、根据进程id查看进程占用端口,查看对应端口为8080(如果没有netstat命令,使用 yum -y install net-tools安装)
netstat -nap | grep 1095
3、根据端口查看对应进程,查看占用8080端口的进程id,为1095
netstat -tunlp | grep 8080
4、根据进程id查看进程信息,查看进程id为1095的进程信息
ps -ef | grep 1095
5、根据进程id杀死进程,杀死进程id为1095的进程
kill -9 1095
# window 查看占用端口80
netstat -aon|findstr "80"
# 查询进程号2448信息
tasklist|findstr "2448"
# 可以在任务管理器查询进程号并杀死
© 版权声明
THE END


![图片[1]-Linux下查看进程和端口信息-创信博客](https://blog.cxinyun.cn/wp-content/uploads/2021/10/1634964957-e206a54e97690cc-300x169.jpg)
![图片[2]-Linux下查看进程和端口信息-创信博客](https://blog.cxinyun.cn/wp-content/uploads/2021/10/1634965011-5547ee12241af07.png)
![图片[3]-Linux下查看进程和端口信息-创信博客](https://blog.cxinyun.cn/wp-content/uploads/2021/10/1634965045-650c9c4ba50302e.png)
![图片[4]-Linux下查看进程和端口信息-创信博客](https://blog.cxinyun.cn/wp-content/uploads/2021/10/1634965081-90ad3dc49d255d0.png)
![图片[5]-Linux下查看进程和端口信息-创信博客](https://blog.cxinyun.cn/wp-content/uploads/2021/10/1634965113-89d265f92c4b598.png)















![表情[tiaopi]-创信博客](https://blog.cxinyun.cn/wp-content/themes/zibll8.1/img/smilies/tiaopi.gif)
暂无评论内容