当前位置:网站首页>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
边栏推荐
- Chapter 20 using work queue manager (3)
- 机械臂速成小指南(十二):逆运动学分析
- How C language determines whether it is a 32-bit system or a 64 bit system
- 怎样用Google APIs和Google的应用系统进行集成(1)—-Google APIs简介
- Force buckle 2319 Judge whether the matrix is an X matrix
- kubernetes之创建mysql8
- Force buckle 1232 Dotted line
- MIT科技评论文章:围绕Gato等模型的AGI炒作可能使人们忽视真正重要的问题
- 2022如何评估与选择低代码开发平台?
- Implement secondary index with Gaussian redis
猜你喜欢
随机推荐
开发那些事儿:Go加C.free释放内存,编译报错是什么原因?
Traversal of Oracle stored procedures
上海交大最新《标签高效深度分割》研究进展综述,全面阐述无监督、粗监督、不完全监督和噪声监督的深度分割方法
Dachang classic pointer written test questions
vulnhub之Funfox2
Cuda版本不一致,编译apex报错
How to implement safety practice in software development stage
Force buckle 1790 Can two strings be equal by performing string exchange only once
JVM GC garbage collection brief
机械臂速成小指南(十二):逆运动学分析
[résolution] le paquet « xxxx» n'est pas dans goroot
JNI 初级接触
力扣 643. 子数组最大平均数 I
力扣 599. 两个列表的最小索引总和
Apifox 接口一体化管理新神器
JVM class loading mechanism
网络原理(1)——基础原理概述
使用camunda做工作流设计,驳回操作
Jenkins 用户权限管理
Kubernetes -- detailed usage of kubectl command line tool