当前位置:网站首页>You want to kill a port process, but you can't find it in the service list. You can find this process and kill it through the command line to reduce restarting the computer and find the root cause of
You want to kill a port process, but you can't find it in the service list. You can find this process and kill it through the command line to reduce restarting the computer and find the root cause of
2022-07-07 20:21:00 【Mom, I want to eat roasted sweet potato】
One 、windows Kill port process steps
1. View port processes
netstat -ano | find " port "
2. Find the application occupied by the port process
tasklist | find " Process number (pid)"
3. Kill port process
taskkill /pid Process number -t -f
Tips :find " Process number " Equate to findstr Process number ; The process number is PID Number , See the figure below for details
Two 、Linux Kill port process steps
1.linux Find occupied ports
netstat -tln | grep Port number
netstat -tln View port usage , and netstat -tln | grep Port number Only check the usage of the port number
2.linux Find the application occupied by the port process
lsof -i: Port number
3.linux Kill port process
kill -9 PID
3、 ... and 、 Combine commands with pipe symbols
1. kill 8080 Port process
netstat -nlp |grep :8080 |grep -v grep|awk '{print $7}' |awk -F '/' '{print $1}' |xargs kill -9
2. The query contains tomcat The process number of
ps -ef|grep tomcat|grep -v grep|awk '{print $2}'
3. Kill all that contain ‘tomcat’ The process of
ps -ef|grep tomcat|grep -v grep|awk '{print $2}' |xargs kill -9
边栏推荐
猜你喜欢
随机推荐
Implement secondary index with Gaussian redis
Some important knowledge of MySQL
力扣 989. 数组形式的整数加法
深度学习模型压缩与加速技术(七):混合方式
机器学习笔记 - 使用Streamlit探索对象检测数据集
Meta Force原力元宇宙系统开发佛萨奇模式
H3C S7000/S7500E/10500系列堆叠后BFD检测配置方法
力扣 88.合并两个有序数组
Data island is the first danger encountered by enterprises in their digital transformation
TS quick start - Generic
Force buckle 1790 Can two strings be equal by performing string exchange only once
力扣 643. 子数组最大平均数 I
机械臂速成小指南(十二):逆运动学分析
ASP. Net learning & ASP's one word
pom. Brief introduction of XML configuration file label function
整型int的拼接和拆分
力扣674. 最长连续递增序列
ASP.NET学习& asp‘s one word
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
Read PG in data warehouse in one article_ stat